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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 : OffTheRecordProfileImpl(real_profile) { | 483 : OffTheRecordProfileImpl(real_profile) { |
484 } | 484 } |
485 | 485 |
486 virtual ProfileType GetProfileType() const OVERRIDE { | 486 virtual ProfileType GetProfileType() const OVERRIDE { |
487 return GUEST_PROFILE; | 487 return GUEST_PROFILE; |
488 } | 488 } |
489 | 489 |
490 virtual void InitChromeOSPreferences() OVERRIDE { | 490 virtual void InitChromeOSPreferences() OVERRIDE { |
491 chromeos_preferences_.reset(new chromeos::Preferences()); | 491 chromeos_preferences_.reset(new chromeos::Preferences()); |
492 chromeos_preferences_->Init( | 492 chromeos_preferences_->Init( |
493 static_cast<PrefServiceSyncable*>(GetPrefs()), | 493 this, user_manager::UserManager::Get()->GetActiveUser()); |
494 user_manager::UserManager::Get()->GetActiveUser()); | |
495 } | 494 } |
496 | 495 |
497 private: | 496 private: |
498 // The guest user should be able to customize Chrome OS preferences. | 497 // The guest user should be able to customize Chrome OS preferences. |
499 scoped_ptr<chromeos::Preferences> chromeos_preferences_; | 498 scoped_ptr<chromeos::Preferences> chromeos_preferences_; |
500 }; | 499 }; |
501 #endif | 500 #endif |
502 | 501 |
503 Profile* Profile::CreateOffTheRecordProfile() { | 502 Profile* Profile::CreateOffTheRecordProfile() { |
504 OffTheRecordProfileImpl* profile = NULL; | 503 OffTheRecordProfileImpl* profile = NULL; |
(...skipping 27 matching lines...) Expand all Loading... |
532 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 531 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
533 #if defined(OS_CHROMEOS) | 532 #if defined(OS_CHROMEOS) |
534 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 533 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
535 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 534 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
536 g_browser_process->local_state()); | 535 g_browser_process->local_state()); |
537 } | 536 } |
538 #endif // defined(OS_CHROMEOS) | 537 #endif // defined(OS_CHROMEOS) |
539 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 538 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
540 GetPrefs(), g_browser_process->local_state()); | 539 GetPrefs(), g_browser_process->local_state()); |
541 } | 540 } |
OLD | NEW |