Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5929)

Unified Diff: chrome/browser/ui/browser.h

Issue 10412061: Fix crashes in DownloadRequestLimiter when extension popups/bubbles initiate downloads automatically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 46ba61cd7af8162c330ab1cd451aa825a901b08f..c4947409a7e962b40906337322dfa6bfa2793fc7 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -818,58 +818,6 @@ class Browser : public TabStripModelDelegate,
return extension_window_controller_.get();
}
- protected:
- // Wrapper for the factory method in BrowserWindow. This allows subclasses to
- // set their own window.
- virtual BrowserWindow* CreateBrowserWindow();
-
- private:
- friend class BrowserTest;
- FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest);
- FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
- FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut);
- FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp);
- FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch);
- FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed);
- FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest,
- DenyExitsFullscreen);
- FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutNoPref);
- FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,
- OpenAppShortcutWindowPref);
- FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutTabPref);
- FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutPanel);
-
- // Used to describe why a tab is being detached. This is used by
- // TabDetachedAtImpl.
- enum DetachType {
- // Result of TabDetachedAt.
- DETACH_TYPE_DETACH,
-
- // Result of TabReplacedAt.
- DETACH_TYPE_REPLACE,
-
- // Result of the tab strip not having any significant tabs.
- DETACH_TYPE_EMPTY
- };
-
- // Describes where the bookmark bar state change originated from.
- enum BookmarkBarStateChangeReason {
- // From the constructor.
- BOOKMARK_BAR_STATE_CHANGE_INIT,
-
- // Change is the result of the active tab changing.
- BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH,
-
- // Change is the result of the bookmark bar pref changing.
- BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE,
-
- // Change is the result of a state change in the active tab.
- BOOKMARK_BAR_STATE_CHANGE_TAB_STATE,
-
- // Change is the result of window toggling in/out of fullscreen mode.
- BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN,
- };
-
// Overridden from content::WebContentsDelegate:
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
@@ -979,6 +927,58 @@ class Browser : public TabStripModelDelegate,
virtual void ResizeDueToAutoResize(content::WebContents* source,
const gfx::Size& new_size) OVERRIDE;
+ protected:
+ // Wrapper for the factory method in BrowserWindow. This allows subclasses to
+ // set their own window.
+ virtual BrowserWindow* CreateBrowserWindow();
+
+ private:
+ friend class BrowserTest;
+ FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch);
+ FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed);
+ FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest,
+ DenyExitsFullscreen);
+ FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutNoPref);
+ FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,
+ OpenAppShortcutWindowPref);
+ FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutTabPref);
+ FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, OpenAppShortcutPanel);
+
+ // Used to describe why a tab is being detached. This is used by
+ // TabDetachedAtImpl.
+ enum DetachType {
+ // Result of TabDetachedAt.
+ DETACH_TYPE_DETACH,
+
+ // Result of TabReplacedAt.
+ DETACH_TYPE_REPLACE,
+
+ // Result of the tab strip not having any significant tabs.
+ DETACH_TYPE_EMPTY
+ };
+
+ // Describes where the bookmark bar state change originated from.
+ enum BookmarkBarStateChangeReason {
+ // From the constructor.
+ BOOKMARK_BAR_STATE_CHANGE_INIT,
+
+ // Change is the result of the active tab changing.
+ BOOKMARK_BAR_STATE_CHANGE_TAB_SWITCH,
+
+ // Change is the result of the bookmark bar pref changing.
+ BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE,
+
+ // Change is the result of a state change in the active tab.
+ BOOKMARK_BAR_STATE_CHANGE_TAB_STATE,
+
+ // Change is the result of window toggling in/out of fullscreen mode.
+ BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN,
+ };
+
virtual void FindReply(content::WebContents* tab,
int request_id,
int number_of_matches,

Powered by Google App Engine
This is Rietveld 408576698