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

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

Issue 2838223002: Fix ProcessManagerTest.* flakiness. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 registrar_.Add(this, 242 registrar_.Add(this,
243 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED, 243 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
244 content::Source<BrowserContext>(context)); 244 content::Source<BrowserContext>(context));
245 registrar_.Add(this, 245 registrar_.Add(this,
246 extensions::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, 246 extensions::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
247 content::Source<BrowserContext>(context)); 247 content::Source<BrowserContext>(context));
248 content::DevToolsAgentHost::AddObserver(this); 248 content::DevToolsAgentHost::AddObserver(this);
249 } 249 }
250 250
251 ProcessManager::~ProcessManager() = default; 251 ProcessManager::~ProcessManager() {
252 content::DevToolsAgentHost::RemoveObserver(this);
253 }
252 254
253 void ProcessManager::Shutdown() { 255 void ProcessManager::Shutdown() {
254 extension_registry_->RemoveObserver(this); 256 extension_registry_->RemoveObserver(this);
255 CloseBackgroundHosts(); 257 CloseBackgroundHosts();
256 DCHECK(background_hosts_.empty()); 258 DCHECK(background_hosts_.empty());
257 content::DevToolsAgentHost::RemoveObserver(this); 259 content::DevToolsAgentHost::RemoveObserver(this);
258 site_instance_ = nullptr; 260 site_instance_ = nullptr;
259 } 261 }
260 262
261 void ProcessManager::RegisterRenderFrameHost( 263 void ProcessManager::RegisterRenderFrameHost(
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 if (extension && !IncognitoInfo::IsSplitMode(extension)) { 888 if (extension && !IncognitoInfo::IsSplitMode(extension)) {
887 BrowserContext* original_context = 889 BrowserContext* original_context =
888 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); 890 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context());
889 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); 891 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url);
890 } 892 }
891 893
892 return ProcessManager::GetSiteInstanceForURL(url); 894 return ProcessManager::GetSiteInstanceForURL(url);
893 } 895 }
894 896
895 } // namespace extensions 897 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698