summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
Commit message (Collapse)AuthorAgeFilesLines
* The focus is not restored properly when a Windows modal dialogjcampan@chromium.org2009-09-141-42/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (such as "open file', 'print'...) is closed. We are running these dialogs from a different thread and they cause the browser window to get activated before it has been enabled. This causes the focus restoration to fail as the window is not enabled. In an earlier patch, I fixed it by storing/restoring the focus explicitly before/after the dialog is shown. But the fix did not apply to the print dialog which does not use the code I added my fix in. This CL reverts that previous fix and comes with a simpler solution: if when we are about to restore focus the window is disabled, we delay the focus restoration untill the window is enabled again. BUG=3380 TEST=Set the focus on a page with scroll-bars, right-click to do a 'save as'. Close the dialog. The arrow keys should let you scroll the page. Accelerators such as Ctrl-T should still work. Test 'open a file', 'print' and the font selection dialog (in the options). When closing the dialog the focus should return to the view that last had focus. Review URL: http://codereview.chromium.org/199106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26135 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix the Linux Views build.pkasting@chromium.org2009-09-141-1/+1
| | | | | | | | | TBR=sky BUG=none TEST=none Review URL: http://codereview.chromium.org/203053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26130 0039d316-1c4b-4281-b951-d872f2087c98
* Some initial cleanup of InfoBubble:pkasting@chromium.org2009-09-143-110/+60
| | | | | | | | | | | | | | | | * Remove fading/animation-related code, which didn't do anything * Remove unnecessary #includes * Try and make a few comments better * Make more functions private or protected * Ensure definition order == declaration order Hopefully, there should be no visible effects of this change. BUG=none TEST=none Review URL: http://codereview.chromium.org/204001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26121 0039d316-1c4b-4281-b951-d872f2087c98
* Move sync wizard dimension constants to locale_settings GRD.tim@chromium.org2009-09-141-5/+7
| | | | | | | | BUG=19896 Review URL: http://codereview.chromium.org/192077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26115 0039d316-1c4b-4281-b951-d872f2087c98
* Implements LocationBarView::AvailableWidth for Gtk.sky@chromium.org2009-09-141-2/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/195068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26107 0039d316-1c4b-4281-b951-d872f2087c98
* Use jstemplates in merge and sync setup page.tim@chromium.org2009-09-141-3/+17
| | | | | | | | BUG=19896 Review URL: http://codereview.chromium.org/194092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26102 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up a few things about the first run bubble code:pkasting@chromium.org2009-09-122-254/+291
| | | | | | | | | | | | | | | * Constants at top didn't need "Static" since they were already in an anonymous namespace * Move function definitions out from declarations. This avoids auto-inlining these (sometimes large) functions and makes it easier to see what a class contains. * Now that I could see the class functions, make as many as possible private. * Make sure definition order and declaration order match. This shouldn't make any functional changes. BUG=none TEST=none Review URL: http://codereview.chromium.org/202065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26069 0039d316-1c4b-4281-b951-d872f2087c98
* The shell dialog code explicitly disables the browser HWND before calling ↵jcampan@chromium.org2009-09-111-1/+42
| | | | | | | | | | | | | | the Windows API to select a file. When the dialog is closed, the browser HWND gets a WM_ACTIVATE but is still disabled, which messes up with the focus restoration. This patch ensures we restore the focus explicitly when the browser HWND is reenabled to work-around that issue. BUG=3380 TEST=Set the focus on a page with scroll-bars, right-click to do a 'save as'. Close the dialog. The arrow keys should let you scroll the page. Accelerators such as Ctrl-T should still work. Test 'open a file', 'print' and the font selection dialog (in the options). When closing the dialog the focus should return to the view that last had focus. Review URL: http://codereview.chromium.org/195065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26029 0039d316-1c4b-4281-b951-d872f2087c98
* While importing favicon, make sure there is an entry in the history db.kuchhal@chromium.org2009-09-111-6/+6
| | | | | | | | | | This will match with what history db does for regular bookmarked URLs with favicons - when history db is cleaned, we keep an entry in the db with 0 visits as long as that url is bookmarked. BUG=13338 Review URL: http://codereview.chromium.org/193053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26014 0039d316-1c4b-4281-b951-d872f2087c98
* Add button number to page action event reply object. Fix outdated page ↵mattm@chromium.org2009-09-111-1/+8
| | | | | | | | action docs. Review URL: http://codereview.chromium.org/194082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26006 0039d316-1c4b-4281-b951-d872f2087c98
* Force page-action views to update after reloading an extension, by deletingpam@chromium.org2009-09-112-0/+6
| | | | | | | | | | | | | | | them all. Otherwise, since the view count is unchanged, the views continue to use stale extension information and the page-action icon fails to be displayed. Fix excessive timeout logging in WaitForPageActionVisibilityChangeTo(). BUG=http://crbug.com/21324 TEST=write page-action extension, load as unpacked, reload, verify that icon is shown on a matching page. Also covered by browser_tests unit test. Review URL: http://codereview.chromium.org/202027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25996 0039d316-1c4b-4281-b951-d872f2087c98
* [Windows] Clear Browsing Data dialog should not have any button as defaultmark@chromium.org2009-09-112-0/+5
| | | | | | | | | | | | | | action. Also makes the behavior in Windows side act the same as in Linux/Mac. Patch by Thiago Farina <thiago.farina@gmail.com> BUG=21461 TEST=open "clear browsing data" and see if none of buttons are set as default. Code review URL: http://codereview.chromium.org/201080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25992 0039d316-1c4b-4281-b951-d872f2087c98
* Adds pinned tabs to windows. As the code between windows and gtk issky@chromium.org2009-09-119-145/+776
| | | | | | | | | | | | quite similar, this wasn't that much work. BUG=none TEST=make sure tabs behave correctly on windows, as well as testing pinning/unpinning. Review URL: http://codereview.chromium.org/193051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25973 0039d316-1c4b-4281-b951-d872f2087c98
* Gtk: Allow all columns in task manager to be sortable.mhm@chromium.org2009-09-111-13/+3
| | | | | | | | | BUG=21048 TEST=Open task manager and sort any column Review URL: http://codereview.chromium.org/196040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25964 0039d316-1c4b-4281-b951-d872f2087c98
* Strict transport security: add checkbox to clear state.agl@chromium.org2009-09-112-3/+23
| | | | | | | | | | | | | | | This patches add a checkbox to the "Clear Browsing Data" dialog which clears the STS state when checked. Since we don't timestamp our entries (for now at least, should we?), the duration selected has no effect: we always clear everything. Mac doesn't appear to have a dialog for this yet, so no Mac specific changes. http://codereview.chromium.org/196070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25955 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: implement Page Actions support.mattm@chromium.org2009-09-102-164/+19
| | | | | | | | | BUG=11973 TEST=load an extension with page actions, it should work like on windows. Review URL: http://codereview.chromium.org/195050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25934 0039d316-1c4b-4281-b951-d872f2087c98
* Populate strings in gaia_login.html using jstemplates instead of literals.tim@chromium.org2009-09-101-1/+27
| | | | | | | | | | BUG=21494,19896 TEST=SyncSetupWizardTest. Open sync wizard, ensure strings are present (error cases too). Review URL: http://codereview.chromium.org/199083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25929 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringPiece into the base namespace. It is collidingtony@chromium.org2009-09-101-3/+3
| | | | | | | | | | with the StringPiece class in icu4.2, which is a problem when trying to use the system version of icu. Review URL: http://codereview.chromium.org/193072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
* Make the "get themes" button into a link instead.mdm@chromium.org2009-09-102-12/+15
| | | | | | | | | BUG=21414 TEST=none Review URL: http://codereview.chromium.org/203019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25913 0039d316-1c4b-4281-b951-d872f2087c98
* Error diagnostics for Blacklist IOidanan@chromium.org2009-09-102-0/+136
| | | | | | | | | | | | | | For now, as with other extension errors, these are not i18n'd. The blacklist loading error is though because it is most like an error to be shown to end users. BUG=16932 TEST=none Review URL: http://codereview.chromium.org/173357 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25895 0039d316-1c4b-4281-b951-d872f2087c98
* sliding animation for moleserikkay@chromium.org2009-09-101-14/+72
| | | | | | | | | BUG=15494 TEST=none Review URL: http://codereview.chromium.org/203004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25859 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at implementation of FindBar for views / gtkdavemoore@chromium.org2009-09-0911-332/+398
| | | | | | | Also had to implement change notification for TextField on views / gtk Review URL: http://codereview.chromium.org/200035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25819 0039d316-1c4b-4281-b951-d872f2087c98
* Use gfx::Point instead of GET_X/Y_LPARAM to reduce a dependency on ATL.jhawkins@chromium.org2009-09-091-5/+4
| | | | | | | | BUG=5027 TEST=none Review URL: http://codereview.chromium.org/195035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25788 0039d316-1c4b-4281-b951-d872f2087c98
* Make BrowserView layout both extension shelf and bookmarks bar if toolstrips ↵sidchat@google.com2009-09-091-1/+2
| | | | | | | | | | | | change in the extension shelf. BUG=21269 BUG=21270 BUG=21274 TEST=none Review URL: http://codereview.chromium.org/192041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25760 0039d316-1c4b-4281-b951-d872f2087c98
* Replace icu38/icu38.gyp with icu/icu.gyp in gyp files replace all the ↵jshin@chromium.org2009-09-091-1/+1
| | | | | | | | | | | | | | | | | | references to third_party/icu38 and icudt38.dll with third_party/icu and icudt42.dll in vsprops and cc files. Also, update the icu data module name and the icu data symbol in icu_util.cc In addition, add a dummy C++ source file (xmldummy_mac.cc) to libxml to work around an Xcode bug (xmllint and xmlcatalog are linked with gcc rather than g++ even though it's linked to a "C++ library", libicuuc.a). Also updated is the test results for net_util_unittests. This will not be landed until deps/third_party/icu42 is ready for all 3 platforms (Windows VS build files are not yet updated there). BUG=8198 TEST=On all platforms, all the targets are built fine. Review URL: http://codereview.chromium.org/172031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25708 0039d316-1c4b-4281-b951-d872f2087c98
* Wires up drag and drop for bookmark menus and cleans up a couple ofsky@chromium.org2009-09-092-0/+18
| | | | | | | | | | | minor painting issues. BUG=none TEST=none Review URL: http://codereview.chromium.org/199050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25701 0039d316-1c4b-4281-b951-d872f2087c98
* Remove jankiness from bookmark animation for --show-extensions-on-top.sidchat@google.com2009-09-081-4/+0
| | | | | | | | | BUG=20927 TEST=none Review URL: http://codereview.chromium.org/192039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25680 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes regression introduced in dnd refactoring. I removed a check forsky@chromium.org2009-09-084-39/+105
| | | | | | | | | | | | | | the URL that I shouldn't have (it won't be needed at some point, but it is now). BUG=21198 TEST=Select a URL and drag to the tab strip. Make sure you get the drop target and you can drop the text to create a new tab. Do the same with www.google.com, you shouldn't get a drop target. Review URL: http://codereview.chromium.org/202010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25653 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux-views build by adding a header change I missed in my previous ↵snej@chromium.org2009-09-082-2/+5
| | | | | | | | | | | checkin (r25629). BUG=http://code.google.com/p/chromium/issues/detail?id=14654, http://code.google.com/p/chromium/issues/detail?id=20985 TEST=LayoutTests/fast/events/drag-dropeffect.html, LayoutTests/editing/pasteboard/files-during-page-drags.html Review URL: http://codereview.chromium.org/192040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25636 0039d316-1c4b-4281-b951-d872f2087c98
* Fleshes out the tooltip implementation for views on Gtk. It doesn'tsky@chromium.org2009-09-082-41/+20
| | | | | | | | | | | | support explicit positioning of the tooltip as windows does. That'll have to be added later. BUG=none TEST=make sure tooltips still work correctly on windows Review URL: http://codereview.chromium.org/197031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25635 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb the DragOperation through all the layers between the platform ↵snej@chromium.org2009-09-083-7/+15
| | | | | | | | | | | | | Drag-n-drop code and WebCore. This allows the HTML5 DataTransfer effectAllowed and dropEffect properties to be set correctly in JS handlers, as per the HTML5 spec. (The drag-dropeffect test isn't in WebKit yet -- it's part of a separate WebKit patch that's been in review for weeks.) R=darin,pink BUG=http://code.google.com/p/chromium/issues/detail?id=14654, http://code.google.com/p/chromium/issues/detail?id=20985 TEST=LayoutTests/fast/events/drag-dropeffect.html, LayoutTests/editing/pasteboard/files-during-page-drags.html Review URL: http://codereview.chromium.org/174364 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25629 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some gcc 4.4 issues when compiling with toolkit_views.craig.schlenter@chromium.org2009-09-072-5/+6
| | | | | | | | | | | | | | | | | | | | | Most of these squash harmless compiler warnings but the custom_button.cc change fixes a real problem with the accelerator key bitmask calculation (+ preceeds << in terms of operator precedence) The change to tab_strip.cc is ugly but it fixes the following error: chrome/browser/views/tabs/tab_strip.cc: In member function ‘void TabStrip::StartRemoveTabAnimation(int, TabContents*)’: chrome/browser/views/tabs/tab_strip.cc:201: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false As an added bonus, this makes the Linux shared build of toolkit_views work too. Review URL: http://codereview.chromium.org/199025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25602 0039d316-1c4b-4281-b951-d872f2087c98
* Fix adjacent separators when not running with --enable-sync.pkasting@chromium.org2009-09-051-1/+1
| | | | | | | | BUG=20408 TEST=Open tools menu, see that there are no instances of two adjacent separators Review URL: http://codereview.chromium.org/192032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25581 0039d316-1c4b-4281-b951-d872f2087c98
* Fix small pixel glitches in omnibox dropdown corners.pkasting@chromium.org2009-09-052-4/+15
| | | | | | | | BUG=21146 TEST=Omnibox dropdown corners look nicer Review URL: http://codereview.chromium.org/201037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25568 0039d316-1c4b-4281-b951-d872f2087c98
* Move the "history is too new" dialog out oftony@chromium.org2009-09-052-0/+22
| | | | | | | | | | | | | chrome/browser/history/history.cc. Instead use a notification that Browser picks up and delegates to BrowserWindow. Include implementations for Windows, Linux GTK+, and Linux Views (sorry, no mac impl). Review URL: http://codereview.chromium.org/200023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25556 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the default browser check to return "unknown" and reflect that in the UI.mdm@chromium.org2009-09-041-1/+7
| | | | | | | | | | On Linux this can happen for unsupported desktop environments. On Windows and Mac OS X this probably should not occur and likely indicates some sort of serious configuration error. This change avoids repeatedly bothering the user to set the default browser in cases where we're likely to fail at that, without incorrectly displaying that we are the default browser. BUG=none TEST=none Review URL: http://codereview.chromium.org/200025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25553 0039d316-1c4b-4281-b951-d872f2087c98
* Make the extension shelf appear on the left of the bookmark bar, instead of ↵sidchat@google.com2009-09-042-17/+58
| | | | | | | | | | on the right. BUG=http://www.crbug.com/20929 TEST=none Review URL: http://codereview.chromium.org/198002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25533 0039d316-1c4b-4281-b951-d872f2087c98
* Convert std::wstring encoding names to std::string in a bunch of files.tony@chromium.org2009-09-043-13/+14
| | | | | | | | | | | | | | | BUG=8647 (http://crbug.com/8647) TEST=run unit_tests.exe and ui_tests.exe Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/179057/show Some linux related fixes by me. Review URL: http://codereview.chromium.org/192017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25529 0039d316-1c4b-4281-b951-d872f2087c98
* Delete all precompiled support. It is causing more harm than good, ↵maruel@chromium.org2009-09-042-3/+9
| | | | | | | | | | | | especially when define changes. TEST=none BUG=20889 Review URL: http://codereview.chromium.org/171118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25511 0039d316-1c4b-4281-b951-d872f2087c98
* Use ScopedComPtr instead of CComPtr to reduce a dependency on ATL.jhawkins@chromium.org2009-09-041-4/+4
| | | | | | | | BUG=5027 TEST=none Review URL: http://codereview.chromium.org/201012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25498 0039d316-1c4b-4281-b951-d872f2087c98
* Use system background color for info bubbles. This causes some problems ↵pkasting@chromium.org2009-09-042-9/+7
| | | | | | | | | right now due to bug 21027 and bug 21028. BUG=92 TEST=Go to a secure site, hover the lock and see that the bubble uses the system window background color. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25497 0039d316-1c4b-4281-b951-d872f2087c98
* Use system themes where possible in Omnibox edit and dropdown; in other ↵pkasting@chromium.org2009-09-043-109/+177
| | | | | | | | | | cases, provide a pair of colors and use whichever contrasts more with the relevant background color, to maintain readability. BUG=92,18367 TEST=Use the omnibox on various non-default and high-contrast system themes. Observe that everything is always readable. Review URL: http://codereview.chromium.org/200009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25494 0039d316-1c4b-4281-b951-d872f2087c98
* Disable flaky TabDraggingTest.Tab1Tab3Escape.phajdan.jr@chromium.org2009-09-041-1/+2
| | | | | | | | | TEST=none http://crbug.com/21092 Review URL: http://codereview.chromium.org/196027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25455 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing focus in location bar and accelerators on Linux toolkit views.jcampan@chromium.org2009-09-033-2/+46
| | | | | | | | | | | | | | | BUG=None TEST=Focus the location bar, deactive/reactivate the browser window with Alt-Tab, the focus should still be on the location bar. Click few links on a page to have a history navigation. Focus the location bar, use backspace to delete some text. Focus a text area in a web page, make sure backspace works as expected (deletes text). Now click on a non text area, press backspace. You should trigger a navigate back. Review URL: http://codereview.chromium.org/185014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25389 0039d316-1c4b-4281-b951-d872f2087c98
* Add "loading..." message to theme install to counter jank.mirandac@chromium.org2009-09-032-0/+218
| | | | | | | | | BUG= http://crbug.com/17696 TEST= Install a theme. Note that a "loading" message appears to notify you that a theme is loading. Review URL: http://codereview.chromium.org/191011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25383 0039d316-1c4b-4281-b951-d872f2087c98
* Add external protocol dialog for Linux.estade@chromium.org2009-09-032-41/+26
| | | | | | | | | | This exposes a bug where \n in a string resource is rendered literally when it is displayed. I don't know at what point on Windows the '\' + 'n' is translated to a line return, I have filed crbug.com/20943 BUG=20731 Review URL: http://codereview.chromium.org/194002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25373 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing headers for Release.finnur@chromium.org2009-09-031-0/+2
| | | | | | | | | TBR=jcampan BUG=None TEST=Release build should work now. Review URL: http://codereview.chromium.org/196008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25369 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 9867: Activating the previous/next buttons with the keyboard in the find ↵finnur@chromium.org2009-09-0369-116/+170
| | | | | | | | | | | | | bar should not change the focus. Add param const Event& event to ButtonPressed, so that recipients can find out more about the event that generated the ButtonPress message. BUG=9687 TEST=Open www.google.com and open Find-in-page, search for 'e'. Press FindNext button with mouse and note that the focus should be on the textfield. Now press Tab twice to put focus on the FindNext button and press SpaceBar a few times. Note that the focus should stay on the FindNext button. Review URL: http://codereview.chromium.org/188016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25367 0039d316-1c4b-4281-b951-d872f2087c98
* Make the omnibox 2 hover code a tiny bit less goofy by removing a now-unused ↵pkasting@chromium.org2009-09-032-22/+18
| | | | | | | | | | | | function (although it may have to come back eventually) and using the Model's conception of hover state instead of direct hot-tracking in the view. Unfortunately, there are still problems, including bogus mousemove events for the same point and no WM_MOUSELEAVE events, all of which the old code handled. I think fixing this is going to require implementing a TODO in the code to hoist mouse handling to the main dropdown view, at which point I can probably address issue 13703 as well. BUG=13279 TEST=none Review URL: http://codereview.chromium.org/187002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25336 0039d316-1c4b-4281-b951-d872f2087c98
* Move status area view to the chromeos directory.brettw@chromium.org2009-09-032-409/+0
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/192001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25279 0039d316-1c4b-4281-b951-d872f2087c98