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

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

Issue 23095006: If user profile doesn't contain language setting, default to his Google account settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix shared build. Created 7 years, 4 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // The incognito profile shouldn't have Chrome OS's preferences. 398 // The incognito profile shouldn't have Chrome OS's preferences.
399 // The preferences are associated with the regular user profile. 399 // The preferences are associated with the regular user profile.
400 } 400 }
401 #endif // defined(OS_CHROMEOS) 401 #endif // defined(OS_CHROMEOS)
402 402
403 #if defined(OS_CHROMEOS) 403 #if defined(OS_CHROMEOS)
404 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale, 404 void OffTheRecordProfileImpl::ChangeAppLocale(const std::string& locale,
405 AppLocaleChangedVia) { 405 AppLocaleChangedVia) {
406 } 406 }
407 407
408 void OffTheRecordProfileImpl::MarkCreated() {
409 }
410
408 void OffTheRecordProfileImpl::OnLogin() { 411 void OffTheRecordProfileImpl::OnLogin() {
409 } 412 }
413
414 void OffTheRecordProfileImpl::RespectLocalePreference() {
415 }
416
417 void OffTheRecordProfileImpl::SetGPlusProfileLocale(const std::string&) {
418 }
410 #endif // defined(OS_CHROMEOS) 419 #endif // defined(OS_CHROMEOS)
411 420
412 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() { 421 PrefProxyConfigTracker* OffTheRecordProfileImpl::GetProxyConfigTracker() {
413 if (!pref_proxy_config_tracker_) 422 if (!pref_proxy_config_tracker_)
414 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker()); 423 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker());
415 return pref_proxy_config_tracker_.get(); 424 return pref_proxy_config_tracker_.get();
416 } 425 }
417 426
418 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() { 427 chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() {
419 // We do not store information about websites visited in OTR profiles which 428 // We do not store information about websites visited in OTR profiles which
(...skipping 24 matching lines...) Expand all
444 public: 453 public:
445 explicit GuestSessionProfile(Profile* real_profile) 454 explicit GuestSessionProfile(Profile* real_profile)
446 : OffTheRecordProfileImpl(real_profile) { 455 : OffTheRecordProfileImpl(real_profile) {
447 } 456 }
448 457
449 virtual void InitChromeOSPreferences() OVERRIDE { 458 virtual void InitChromeOSPreferences() OVERRIDE {
450 chromeos_preferences_.reset(new chromeos::Preferences()); 459 chromeos_preferences_.reset(new chromeos::Preferences());
451 chromeos_preferences_->Init(static_cast<PrefServiceSyncable*>(GetPrefs())); 460 chromeos_preferences_->Init(static_cast<PrefServiceSyncable*>(GetPrefs()));
452 } 461 }
453 462
463 virtual std::string GetGPlusLocale() const OVERRIDE {
464 return std::string();
465 }
466
467 virtual void SetGPlusProfileLocale(const std::string&) OVERRIDE {
468 }
469
454 private: 470 private:
455 // The guest user should be able to customize Chrome OS preferences. 471 // The guest user should be able to customize Chrome OS preferences.
456 scoped_ptr<chromeos::Preferences> chromeos_preferences_; 472 scoped_ptr<chromeos::Preferences> chromeos_preferences_;
457 }; 473 };
458 #endif 474 #endif
459 475
460 Profile* Profile::CreateOffTheRecordProfile() { 476 Profile* Profile::CreateOffTheRecordProfile() {
461 OffTheRecordProfileImpl* profile = NULL; 477 OffTheRecordProfileImpl* profile = NULL;
462 #if defined(OS_CHROMEOS) 478 #if defined(OS_CHROMEOS)
463 if (IsGuestSession()) 479 if (IsGuestSession())
(...skipping 26 matching lines...) Expand all
490 #if defined(OS_CHROMEOS) 506 #if defined(OS_CHROMEOS)
491 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 507 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
492 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 508 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
493 g_browser_process->local_state()); 509 g_browser_process->local_state());
494 } 510 }
495 #endif // defined(OS_CHROMEOS) 511 #endif // defined(OS_CHROMEOS)
496 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 512 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
497 GetPrefs(), g_browser_process->local_state()); 513 GetPrefs(), g_browser_process->local_state());
498 } 514 }
499 515
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698