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

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

Issue 6484033: Fix a bug that caused Chrome OS system preferences not to work in the guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rework again! Created 9 years, 10 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 #if !defined(OS_CHROMEOS) 306 #if !defined(OS_CHROMEOS)
307 // Listen for bookmark model load, to bootstrap the sync service. 307 // Listen for bookmark model load, to bootstrap the sync service.
308 // On CrOS sync service will be initialized after sign in. 308 // On CrOS sync service will be initialized after sign in.
309 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED, 309 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED,
310 Source<Profile>(this)); 310 Source<Profile>(this));
311 #endif 311 #endif
312 312
313 ssl_config_service_manager_.reset( 313 ssl_config_service_manager_.reset(
314 SSLConfigServiceManager::CreateDefaultManager(this)); 314 SSLConfigServiceManager::CreateDefaultManager(this));
315 315
316 #if defined(OS_CHROMEOS)
317 chromeos_preferences_.reset(new chromeos::Preferences());
318 chromeos_preferences_->Init(prefs);
319 #endif
320
321 pinned_tab_service_.reset(new PinnedTabService(this)); 316 pinned_tab_service_.reset(new PinnedTabService(this));
322 317
323 // Initialize the BackgroundModeManager - this has to be done here before 318 // Initialize the BackgroundModeManager - this has to be done here before
324 // InitExtensions() is called because it relies on receiving notifications 319 // InitExtensions() is called because it relies on receiving notifications
325 // when extensions are loaded. BackgroundModeManager is not needed under 320 // when extensions are loaded. BackgroundModeManager is not needed under
326 // ChromeOS because Chrome is always running (no need for special keep-alive 321 // ChromeOS because Chrome is always running (no need for special keep-alive
327 // or launch-on-startup support). 322 // or launch-on-startup support).
328 #if !defined(OS_CHROMEOS) 323 #if !defined(OS_CHROMEOS)
329 background_mode_manager_.reset(new BackgroundModeManager(this, 324 background_mode_manager_.reset(new BackgroundModeManager(this,
330 CommandLine::ForCurrentProcess())); 325 CommandLine::ForCurrentProcess()));
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 new chromeos::ProxyConfigServiceImpl(); 1478 new chromeos::ProxyConfigServiceImpl();
1484 } 1479 }
1485 return chromeos_proxy_config_service_impl_; 1480 return chromeos_proxy_config_service_impl_;
1486 } 1481 }
1487 1482
1488 void ProfileImpl::SetupChromeOSEnterpriseExtensionObserver() { 1483 void ProfileImpl::SetupChromeOSEnterpriseExtensionObserver() {
1489 DCHECK(!chromeos_enterprise_extension_observer_.get()); 1484 DCHECK(!chromeos_enterprise_extension_observer_.get());
1490 chromeos_enterprise_extension_observer_.reset( 1485 chromeos_enterprise_extension_observer_.reset(
1491 new chromeos::EnterpriseExtensionObserver(this)); 1486 new chromeos::EnterpriseExtensionObserver(this));
1492 } 1487 }
1488
1489 void ProfileImpl::InitChromeOSPreferences() {
1490 chromeos_preferences_.reset(new chromeos::Preferences());
1491 chromeos_preferences_->Init(GetPrefs());
1492 }
1493 #endif // defined(OS_CHROMEOS) 1493 #endif // defined(OS_CHROMEOS)
1494 1494
1495 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { 1495 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() {
1496 if (!pref_proxy_config_tracker_) 1496 if (!pref_proxy_config_tracker_)
1497 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs()); 1497 pref_proxy_config_tracker_ = new PrefProxyConfigTracker(GetPrefs());
1498 1498
1499 return pref_proxy_config_tracker_; 1499 return pref_proxy_config_tracker_;
1500 } 1500 }
1501 1501
1502 PrerenderManager* ProfileImpl::GetPrerenderManager() { 1502 PrerenderManager* ProfileImpl::GetPrerenderManager() {
1503 if (!PrerenderManager::IsPrerenderingEnabled()) 1503 if (!PrerenderManager::IsPrerenderingEnabled())
1504 return NULL; 1504 return NULL;
1505 if (!prerender_manager_) 1505 if (!prerender_manager_)
1506 prerender_manager_ = new PrerenderManager(this); 1506 prerender_manager_ = new PrerenderManager(this);
1507 return prerender_manager_; 1507 return prerender_manager_;
1508 } 1508 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698