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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 14845020: Ignore unwanted AddRef/ReleaesModule calls to g_browser_process from the views layer during startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 60db143f2af747a12fe539e050ce8d7a642df488..99620d9b1018492904f927e745e5006608e5a518 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -62,6 +62,10 @@ PrefService* GetPrefsForWindow(const views::Widget* window) {
} // namespace
+
+ChromeViewsDelegate::ChromeViewsDelegate() : is_ref_counting_(false) {
+}
+
///////////////////////////////////////////////////////////////////////////////
// ChromeViewsDelegate, views::ViewsDelegate implementation:
@@ -162,12 +166,18 @@ bool ChromeViewsDelegate::UseTransparentWindows() const {
#endif
}
+void ChromeViewsDelegate::SetRefCounting(bool is_ref_counting) {
+ is_ref_counting_ = is_ref_counting;
+}
+
void ChromeViewsDelegate::AddRef() {
- g_browser_process->AddRefModule();
+ if (is_ref_counting_)
+ g_browser_process->AddRefModule();
}
void ChromeViewsDelegate::ReleaseRef() {
- g_browser_process->ReleaseModule();
+ if (is_ref_counting_)
+ g_browser_process->ReleaseModule();
}
content::WebContents* ChromeViewsDelegate::CreateWebContents(
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698