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

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

Issue 13825014: Change RulesRegistryService to use ProfileKeyedAPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved functionality from InitForOTR into RulesRegistryService constructor 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
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_util.h" 10 #include "base/file_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 start_time_(Time::Now()), 90 start_time_(Time::Now()),
91 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged, 91 zoom_callback_(base::Bind(&OffTheRecordProfileImpl::OnZoomLevelChanged,
92 base::Unretained(this))) { 92 base::Unretained(this))) {
93 // Register on BrowserContext. 93 // Register on BrowserContext.
94 components::UserPrefs::Set(this, prefs_); 94 components::UserPrefs::Set(this, prefs_);
95 } 95 }
96 96
97 void OffTheRecordProfileImpl::Init() { 97 void OffTheRecordProfileImpl::Init() {
98 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); 98 ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);
99 99
100 extensions::ExtensionSystem::Get(this)->InitForOTRProfile();
101
102 DCHECK_NE(IncognitoModePrefs::DISABLED, 100 DCHECK_NE(IncognitoModePrefs::DISABLED,
103 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); 101 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()));
104 102
105 #if defined(OS_ANDROID) || defined(OS_IOS) 103 #if defined(OS_ANDROID) || defined(OS_IOS)
106 UseSystemProxy(); 104 UseSystemProxy();
107 #endif // defined(OS_ANDROID) || defined(OS_IOS) 105 #endif // defined(OS_ANDROID) || defined(OS_IOS)
108 106
109 // TODO(oshima): Remove the need to eagerly initialize the request context 107 // TODO(oshima): Remove the need to eagerly initialize the request context
110 // getter. chromeos::OnlineAttempt is illegally trying to access this 108 // getter. chromeos::OnlineAttempt is illegally trying to access this
111 // Profile member from a thread other than the UI thread, so we need to 109 // Profile member from a thread other than the UI thread, so we need to
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: 460 case HostZoomMap::ZOOM_CHANGED_FOR_HOST:
463 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); 461 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level);
464 return; 462 return;
465 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: 463 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST:
466 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, 464 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme,
467 change.host, 465 change.host,
468 change.zoom_level); 466 change.zoom_level);
469 return; 467 return;
470 } 468 }
471 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698