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

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

Issue 596613002: Remove content dependencies from content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser_tests fix 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
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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { 348 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() {
349 return profile_->GetSSLConfigService(); 349 return profile_->GetSSLConfigService();
350 } 350 }
351 351
352 HostContentSettingsMap* OffTheRecordProfileImpl::GetHostContentSettingsMap() { 352 HostContentSettingsMap* OffTheRecordProfileImpl::GetHostContentSettingsMap() {
353 // Retrieve the host content settings map of the parent profile in order to 353 // Retrieve the host content settings map of the parent profile in order to
354 // ensure the preferences have been migrated. 354 // ensure the preferences have been migrated.
355 profile_->GetHostContentSettingsMap(); 355 profile_->GetHostContentSettingsMap();
356 if (!host_content_settings_map_.get()) { 356 if (!host_content_settings_map_.get()) {
357 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
rpetterson 2014/09/26 03:46:34 Is there a reason not to have this at the start of
Jun Mukai 2014/09/26 07:45:14 The motivation of this CL is to strip off the depe
blundell 2014/09/26 07:50:41 I think the question is why this DCHECK shouldn't
Jun Mukai 2014/09/26 18:37:37 Ah... HostContentSettings is thread-safe object an
357 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); 358 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true);
358 #if defined(ENABLE_EXTENSIONS) 359 #if defined(ENABLE_EXTENSIONS)
359 ExtensionService* extension_service = 360 ExtensionService* extension_service =
360 extensions::ExtensionSystem::Get(this)->extension_service(); 361 extensions::ExtensionSystem::Get(this)->extension_service();
361 if (extension_service) { 362 if (extension_service) {
362 extension_service->RegisterContentSettings( 363 extension_service->RegisterContentSettings(
363 host_content_settings_map_.get()); 364 host_content_settings_map_.get());
364 } 365 }
365 #endif 366 #endif
366 } 367 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 537 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
537 #if defined(OS_CHROMEOS) 538 #if defined(OS_CHROMEOS)
538 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 539 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
539 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 540 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
540 g_browser_process->local_state()); 541 g_browser_process->local_state());
541 } 542 }
542 #endif // defined(OS_CHROMEOS) 543 #endif // defined(OS_CHROMEOS)
543 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 544 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
544 GetPrefs(), g_browser_process->local_state()); 545 GetPrefs(), g_browser_process->local_state());
545 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698