OLD | NEW |
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { | 114 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
115 content::NotificationService::current()->Notify( | 115 content::NotificationService::current()->Notify( |
116 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this), | 116 chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(this), |
117 content::NotificationService::NoDetails()); | 117 content::NotificationService::NoDetails()); |
118 | 118 |
119 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( | 119 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( |
120 io_data_.GetResourceContextNoInit()); | 120 io_data_.GetResourceContextNoInit()); |
121 | 121 |
122 ExtensionService* extension_service = | 122 ExtensionService* extension_service = |
123 ExtensionSystem::Get(this)->extension_service(); | 123 extensions::ExtensionSystem::Get(this)->extension_service(); |
124 if (extension_service && extension_service->extensions_enabled()) { | 124 if (extension_service && extension_service->extensions_enabled()) { |
125 extension_service->extension_prefs()-> | 125 extension_service->extension_prefs()-> |
126 ClearIncognitoSessionOnlyContentSettings(); | 126 ClearIncognitoSessionOnlyContentSettings(); |
127 } | 127 } |
128 | 128 |
129 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); | 129 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); |
130 | 130 |
131 BrowserThread::PostTask( | 131 BrowserThread::PostTask( |
132 BrowserThread::IO, FROM_HERE, | 132 BrowserThread::IO, FROM_HERE, |
133 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); | 133 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 return profile_; | 184 return profile_; |
185 } | 185 } |
186 | 186 |
187 VisitedLinkMaster* OffTheRecordProfileImpl::GetVisitedLinkMaster() { | 187 VisitedLinkMaster* OffTheRecordProfileImpl::GetVisitedLinkMaster() { |
188 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord | 188 // We don't provide access to the VisitedLinkMaster when we're OffTheRecord |
189 // because we don't want to leak the sites that the user has visited before. | 189 // because we don't want to leak the sites that the user has visited before. |
190 return NULL; | 190 return NULL; |
191 } | 191 } |
192 | 192 |
193 ExtensionService* OffTheRecordProfileImpl::GetExtensionService() { | 193 ExtensionService* OffTheRecordProfileImpl::GetExtensionService() { |
194 return ExtensionSystem::Get(this)->extension_service(); | 194 return extensions::ExtensionSystem::Get(this)->extension_service(); |
195 } | 195 } |
196 | 196 |
197 UserScriptMaster* OffTheRecordProfileImpl::GetUserScriptMaster() { | 197 UserScriptMaster* OffTheRecordProfileImpl::GetUserScriptMaster() { |
198 return ExtensionSystem::Get(this)->user_script_master(); | 198 return extensions::ExtensionSystem::Get(this)->user_script_master(); |
199 } | 199 } |
200 | 200 |
201 ExtensionProcessManager* | 201 ExtensionProcessManager* |
202 OffTheRecordProfileImpl::GetExtensionProcessManager() { | 202 OffTheRecordProfileImpl::GetExtensionProcessManager() { |
203 return ExtensionSystem::Get(this)->process_manager(); | 203 return extensions::ExtensionSystem::Get(this)->process_manager(); |
204 } | 204 } |
205 | 205 |
206 ExtensionEventRouter* OffTheRecordProfileImpl::GetExtensionEventRouter() { | 206 ExtensionEventRouter* OffTheRecordProfileImpl::GetExtensionEventRouter() { |
207 return ExtensionSystem::Get(this)->event_router(); | 207 return extensions::ExtensionSystem::Get(this)->event_router(); |
208 } | 208 } |
209 | 209 |
210 ExtensionSpecialStoragePolicy* | 210 ExtensionSpecialStoragePolicy* |
211 OffTheRecordProfileImpl::GetExtensionSpecialStoragePolicy() { | 211 OffTheRecordProfileImpl::GetExtensionSpecialStoragePolicy() { |
212 return GetOriginalProfile()->GetExtensionSpecialStoragePolicy(); | 212 return GetOriginalProfile()->GetExtensionSpecialStoragePolicy(); |
213 } | 213 } |
214 | 214 |
215 GAIAInfoUpdateService* OffTheRecordProfileImpl::GetGAIAInfoUpdateService() { | 215 GAIAInfoUpdateService* OffTheRecordProfileImpl::GetGAIAInfoUpdateService() { |
216 return NULL; | 216 return NULL; |
217 } | 217 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (!profile) | 470 if (!profile) |
471 profile = new OffTheRecordProfileImpl(this); | 471 profile = new OffTheRecordProfileImpl(this); |
472 profile->Init(); | 472 profile->Init(); |
473 return profile; | 473 return profile; |
474 } | 474 } |
475 | 475 |
476 base::Callback<ChromeURLDataManagerBackend*(void)> | 476 base::Callback<ChromeURLDataManagerBackend*(void)> |
477 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 477 OffTheRecordProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
478 return io_data_.GetChromeURLDataManagerBackendGetter(); | 478 return io_data_.GetChromeURLDataManagerBackendGetter(); |
479 } | 479 } |
OLD | NEW |