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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 10824020: Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 108 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
109 PluginPrefs::GetForProfile(this), io_data_.GetResourceContextNoInit()); 109 PluginPrefs::GetForProfile(this), io_data_.GetResourceContextNoInit());
110 110
111 BrowserThread::PostTask( 111 BrowserThread::PostTask(
112 BrowserThread::IO, FROM_HERE, 112 BrowserThread::IO, FROM_HERE,
113 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this)); 113 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this));
114 } 114 }
115 115
116 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { 116 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
117 content::NotificationService::current()->Notify(
118 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this),
119 content::NotificationService::NoDetails());
120
121 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( 117 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
122 io_data_.GetResourceContextNoInit()); 118 io_data_.GetResourceContextNoInit());
123 119
124 ExtensionService* extension_service = 120 ExtensionService* extension_service =
125 extensions::ExtensionSystem::Get(this)->extension_service(); 121 extensions::ExtensionSystem::Get(this)->extension_service();
126 if (extension_service && extension_service->extensions_enabled()) { 122 if (extension_service && extension_service->extensions_enabled()) {
127 extension_service->extension_prefs()-> 123 extension_service->extension_prefs()->
128 ClearIncognitoSessionOnlyContentSettings(); 124 ClearIncognitoSessionOnlyContentSettings();
129 } 125 }
130 126
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (!profile) 477 if (!profile)
482 profile = new OffTheRecordProfileImpl(this); 478 profile = new OffTheRecordProfileImpl(this);
483 profile->Init(); 479 profile->Init();
484 return profile; 480 return profile;
485 } 481 }
486 482
487 base::Callback<ChromeURLDataManagerBackend*(void)> 483 base::Callback<ChromeURLDataManagerBackend*(void)>
488 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { 484 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const {
489 return io_data_.GetChromeURLDataManagerBackendGetter(); 485 return io_data_.GetChromeURLDataManagerBackendGetter();
490 } 486 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698