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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style 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 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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)), 87 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)),
88 io_data_(this), 88 io_data_(this),
89 start_time_(Time::Now()), 89 start_time_(Time::Now()),
90 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, 90 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged,
91 base::Unretained(this))) { 91 base::Unretained(this))) {
92 // Register on BrowserContext. 92 // Register on BrowserContext.
93 components::UserPrefs::Set(this, prefs_); 93 components::UserPrefs::Set(this, prefs_);
94 } 94 }
95 95
96 void OffTheRecordProfileImpl::Init() { 96 void OffTheRecordProfileImpl::Init() {
97 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); 97 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
98 this, false);
98 99
99 extensions::ExtensionSystem::Get(this)->InitForOTRProfile(); 100 extensions::ExtensionSystem::Get(this)->InitForOTRProfile();
100 101
101 DCHECK_NE(IncognitoModePrefs::DISABLED, 102 DCHECK_NE(IncognitoModePrefs::DISABLED,
102 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); 103 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()));
103 104
104 #if defined(OS_ANDROID) || defined(OS_IOS) 105 #if defined(OS_ANDROID) || defined(OS_IOS)
105 UseSystemProxy(); 106 UseSystemProxy();
106 #endif // defined(OS_ANDROID) || defined(OS_IOS) 107 #endif // defined(OS_ANDROID) || defined(OS_IOS)
107 108
(...skipping 25 matching lines...) Expand all
133 MaybeSendDestroyedNotification(); 134 MaybeSendDestroyedNotification();
134 135
135 HostZoomMap::GetForBrowserContext(profile_)->RemoveZoomLevelChangedCallback( 136 HostZoomMap::GetForBrowserContext(profile_)->RemoveZoomLevelChangedCallback(
136 zoom_callback_); 137 zoom_callback_);
137 138
138 #if defined(ENABLE_PLUGINS) 139 #if defined(ENABLE_PLUGINS)
139 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( 140 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
140 io_data_.GetResourceContextNoInit()); 141 io_data_.GetResourceContextNoInit());
141 #endif 142 #endif
142 143
143 ProfileDependencyManager::GetInstance()->DestroyProfileServices(this); 144 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
145 this);
144 146
145 BrowserThread::PostTask( 147 BrowserThread::PostTask(
146 BrowserThread::IO, FROM_HERE, 148 BrowserThread::IO, FROM_HERE,
147 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); 149 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this));
148 150
149 if (host_content_settings_map_) 151 if (host_content_settings_map_)
150 host_content_settings_map_->ShutdownOnUIThread(); 152 host_content_settings_map_->ShutdownOnUIThread();
151 153
152 if (pref_proxy_config_tracker_) 154 if (pref_proxy_config_tracker_)
153 pref_proxy_config_tracker_->DetachFromPrefService(); 155 pref_proxy_config_tracker_->DetachFromPrefService();
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: 463 case HostZoomMap::ZOOM_CHANGED_FOR_HOST:
462 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); 464 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level);
463 return; 465 return;
464 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: 466 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST:
465 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, 467 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme,
466 change.host, 468 change.host,
467 change.zoom_level); 469 change.zoom_level);
468 return; 470 return;
469 } 471 }
470 } 472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698