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

Side by Side Diff: extensions/browser/process_manager.cc

Issue 622343002: replace OVERRIDE and FINAL with override and final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/process_manager.h ('k') | extensions/browser/process_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/process_manager.h" 5 #include "extensions/browser/process_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // whether to fall back on the original profile's ProcessManager based 111 // whether to fall back on the original profile's ProcessManager based
112 // on whether a given extension uses "split" or "spanning" incognito behavior. 112 // on whether a given extension uses "split" or "spanning" incognito behavior.
113 class IncognitoProcessManager : public ProcessManager { 113 class IncognitoProcessManager : public ProcessManager {
114 public: 114 public:
115 IncognitoProcessManager(BrowserContext* incognito_context, 115 IncognitoProcessManager(BrowserContext* incognito_context,
116 BrowserContext* original_context, 116 BrowserContext* original_context,
117 ProcessManager* original_manager, 117 ProcessManager* original_manager,
118 ExtensionRegistry* extension_registry); 118 ExtensionRegistry* extension_registry);
119 virtual ~IncognitoProcessManager() {} 119 virtual ~IncognitoProcessManager() {}
120 virtual bool CreateBackgroundHost(const Extension* extension, 120 virtual bool CreateBackgroundHost(const Extension* extension,
121 const GURL& url) OVERRIDE; 121 const GURL& url) override;
122 virtual SiteInstance* GetSiteInstanceForURL(const GURL& url) OVERRIDE; 122 virtual SiteInstance* GetSiteInstanceForURL(const GURL& url) override;
123 123
124 private: 124 private:
125 ProcessManager* original_manager_; 125 ProcessManager* original_manager_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(IncognitoProcessManager); 127 DISALLOW_COPY_AND_ASSIGN(IncognitoProcessManager);
128 }; 128 };
129 129
130 static void CreateBackgroundHostForExtensionLoad( 130 static void CreateBackgroundHostForExtensionLoad(
131 ProcessManager* manager, const Extension* extension) { 131 ProcessManager* manager, const Extension* extension) {
132 DVLOG(1) << "CreateBackgroundHostForExtensionLoad"; 132 DVLOG(1) << "CreateBackgroundHostForExtensionLoad";
(...skipping 13 matching lines...) Expand all
146 private: 146 private:
147 explicit RenderViewHostDestructionObserver(WebContents* web_contents) 147 explicit RenderViewHostDestructionObserver(WebContents* web_contents)
148 : WebContentsObserver(web_contents) { 148 : WebContentsObserver(web_contents) {
149 BrowserContext* context = web_contents->GetBrowserContext(); 149 BrowserContext* context = web_contents->GetBrowserContext();
150 process_manager_ = ExtensionSystem::Get(context)->process_manager(); 150 process_manager_ = ExtensionSystem::Get(context)->process_manager();
151 } 151 }
152 152
153 friend class content::WebContentsUserData<RenderViewHostDestructionObserver>; 153 friend class content::WebContentsUserData<RenderViewHostDestructionObserver>;
154 154
155 // content::WebContentsObserver overrides. 155 // content::WebContentsObserver overrides.
156 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE { 156 virtual void RenderViewDeleted(RenderViewHost* render_view_host) override {
157 process_manager_->UnregisterRenderViewHost(render_view_host); 157 process_manager_->UnregisterRenderViewHost(render_view_host);
158 } 158 }
159 159
160 ProcessManager* process_manager_; 160 ProcessManager* process_manager_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDestructionObserver); 162 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDestructionObserver);
163 }; 163 };
164 164
165 struct ProcessManager::BackgroundPageData { 165 struct ProcessManager::BackgroundPageData {
166 // The count of things keeping the lazy background page alive. 166 // The count of things keeping the lazy background page alive.
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 SiteInstance* IncognitoProcessManager::GetSiteInstanceForURL(const GURL& url) { 951 SiteInstance* IncognitoProcessManager::GetSiteInstanceForURL(const GURL& url) {
952 const Extension* extension = 952 const Extension* extension =
953 extension_registry_->enabled_extensions().GetExtensionOrAppByURL(url); 953 extension_registry_->enabled_extensions().GetExtensionOrAppByURL(url);
954 if (extension && !IncognitoInfo::IsSplitMode(extension)) 954 if (extension && !IncognitoInfo::IsSplitMode(extension))
955 return original_manager_->GetSiteInstanceForURL(url); 955 return original_manager_->GetSiteInstanceForURL(url);
956 956
957 return ProcessManager::GetSiteInstanceForURL(url); 957 return ProcessManager::GetSiteInstanceForURL(url);
958 } 958 }
959 959
960 } // namespace extensions 960 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/process_manager.h ('k') | extensions/browser/process_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698