Update the App restored window frame upon move and resize on Mac.

Previous change https://src.chromium.org/viewvc/chrome?revision=219648&view=revision added support for non resiazable windows to become fullscreen. That change no longer reports the current window's frame dimensions for it's GetRestoredBounds(), but instead returns a cached state which is updated with UpdateRestoredBounds(). This update method needs to be called when the window is moved or resized as well.

BUG=294938

Review URL: https://chromiumcodereview.appspot.com/24237008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224512 0039d316-1c4b-4281-b951-d872f2087c98
Handle the case when StopCaching was called in DoneReading

If StopCaching is called, it is possible for mode_ to be NONE while entry_ is
non-NULL and points to an entry in write mode. Don't incorrectly close it as a
read entry (thus crashing) in DoneReading. Add a test which stresses this case.

BUG=295638
TEST=HttpCache.StopCachingThenDoneReadingDeletesEntry,
     downloading a large-ish download with gzip compression doesn't crash

Review URL: https://chromiumcodereview.appspot.com/24286004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224513 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224513
Fixed problems with pin/unpin preferences changing for not running applications & icon order changes upon sync operations

There are multiple problems fixed with this patch:
1. When a running and pinned app (Windowed V1, V2) gets unpinned via sync operation (or multi user switching), the icon will disappear and the sytem gets into an unstable state (-> Crash later on).
2. When a running app (Windowed V1, V2) gets pinned via a sync operation (or multi user switching), the icon will be shown, but get into an unsecure state which can lead to crashes.
3. There are several cases, where the chrome browser icon does change locations due to sync / multi user switching operations. In this case the icon can shift by one spot to the right.
4. There were some problems with the alternate shelf layout.

That all said: With M32 we should possibly come up with a new way of storing running V1/V2 applications since the running applications are not stored by the preferences and can therefore flip around when switching between users AND windowed V1 apps currently have the same "weight" as an application launcher - which means that they will "float around" in the shelf between sync / switch operations.

My visual test to see that everything was working was as follows:

In Multi session mode, have one user with the following applications pinned:
Chrome Shop, VNC, Angry Birds, gmail, calendar, chrome
and another user with two other applications and chrome.

Switch between the two and everything should be fine.
Run VNC (V2 app). Switch to user 2 and see that it is unpinned at the end of the list. Switch back and see it sliding back to where it belongs.
Then do the same for a windowed V1 app (gmail). Note that the gmail item will not float to the end of the list in user 2 - which is because of the already mentioned weights.
BUG=294435, 294231, 294227
TEST=unit tests and visual (see above)
R=oshima@chromium.org

Review URL: https://codereview.chromium.org/23580008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224514 0039d316-1c4b-4281-b951-d872f2087c98
Reland Multiprofile avatar menu for ChromeOS users.

This change affects ChromeOS when the multiple profiles flag is set.
If multiple user accounts have been logged in on a device, the avatar menu
will include a link to add a user to the session. Once some number of users
is added, the avatar menu will display all logged in users and allow the user
to switch to, or open, a browser window for a given profile.

AvatarMenuModel moved to AvatarMenu, model and "controller" functions separated
out into interfaces ProfileList and AvatarMenuActions. AvatarMenu instantiates
components based on multi-profile flag and platform. ChromeOS version of
ProfileList uses the UserManager to identify logged-in users and translate them
into their corresponding profiles.

Original review: https://codereview.chromium.org/23876020/

BUG=288365
TEST=manual, added /chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
TBR=ben,erg,dpolukhin,xiyuan,michaelpg

Review URL: https://codereview.chromium.org/24190003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224515 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224514
Add links and cosmetic fixes

BUG=None
R=binji@chromium.org

Review URL: https://codereview.chromium.org/23483061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224516 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224516
Explicitly use BGRA instead of native format.
BUG=272346
TEST=run example, trybots
R=noelallen@chromium.org

Review URL: https://codereview.chromium.org/23600057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224517 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224517
Fix Desktop Media Picker implementation to hide itself

Currently Desktop Media Picker shows itself available for selection. That
doesn't make sense. Fixed DesktopMediaPickerModel to hide the dialog window
from the list of sources.

BUG=289757
R=sky@chromium.org

Review URL: https://codereview.chromium.org/23629049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224518 0039d316-1c4b-4281-b951-d872f2087c98
[chromedriver] Add step annotation for updating the android test result log.

Otherwise the script output dirties up the java tests step.

BUG=None
TEST=None
NOTRY=True

Review URL: https://chromiumcodereview.appspot.com/24227009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224519 0039d316-1c4b-4281-b951-d872f2087c98
Replaced UMA counters with UMA histogram.

BUG=295476
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/24246015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224520 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224520
Fixes activation problem when switching from metro

There is no need to deactivate and reactivate the window. The Focus()
in particular is wrong in so far as we don't want focus to go to the
rootwindow.

BUG=284411
TEST=see bug
R=ananta@chromium.org
TBR=jschuh@chromium.org

Review URL: https://codereview.chromium.org/23851042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224521 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 224521