| OLD | NEW |
| 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.h" | 5 #include "chrome/browser/profiles/profile.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); | 105 prefs->RegisterBooleanPref(prefs::kDisableExtensions, false); |
| 106 prefs->RegisterStringPref(prefs::kSelectFileLastDirectory, ""); | 106 prefs->RegisterStringPref(prefs::kSelectFileLastDirectory, ""); |
| 107 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
| 108 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both | 108 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both |
| 109 // local state and user's profile. For other platforms we maintain | 109 // local state and user's profile. For other platforms we maintain |
| 110 // kApplicationLocale only in local state. | 110 // kApplicationLocale only in local state. |
| 111 // In the future we may want to maintain kApplicationLocale | 111 // In the future we may want to maintain kApplicationLocale |
| 112 // in user's profile for other platforms as well. | 112 // in user's profile for other platforms as well. |
| 113 prefs->RegisterStringPref(prefs::kApplicationLocale, ""); | 113 prefs->RegisterStringPref(prefs::kApplicationLocale, ""); |
| 114 prefs->RegisterStringPref(prefs::kApplicationLocaleBackup, ""); | 114 prefs->RegisterStringPref(prefs::kApplicationLocaleBackup, ""); |
| 115 prefs->RegisterStringPref(prefs::kApplicationLocaleOverride, ""); |
| 116 prefs->RegisterStringPref(prefs::kApplicationLocaleAccepted, ""); |
| 115 #endif | 117 #endif |
| 116 } | 118 } |
| 117 | 119 |
| 118 // static | 120 // static |
| 119 URLRequestContextGetter* Profile::GetDefaultRequestContext() { | 121 URLRequestContextGetter* Profile::GetDefaultRequestContext() { |
| 120 return default_request_context_; | 122 return default_request_context_; |
| 121 } | 123 } |
| 122 | 124 |
| 123 bool Profile::IsSyncAccessible() { | 125 bool Profile::IsSyncAccessible() { |
| 124 ProfileSyncService* syncService = GetProfileSyncService(); | 126 ProfileSyncService* syncService = GetProfileSyncService(); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 598 } |
| 597 | 599 |
| 598 virtual policy::ProfilePolicyContext* GetPolicyContext() { | 600 virtual policy::ProfilePolicyContext* GetPolicyContext() { |
| 599 return NULL; | 601 return NULL; |
| 600 } | 602 } |
| 601 | 603 |
| 602 virtual PromoCounter* GetInstantPromoCounter() { | 604 virtual PromoCounter* GetInstantPromoCounter() { |
| 603 return NULL; | 605 return NULL; |
| 604 } | 606 } |
| 605 | 607 |
| 608 #if defined(OS_CHROMEOS) |
| 609 virtual void ChangeApplicationLocale( |
| 610 const std::string& locale, bool keep_local) { |
| 611 } |
| 612 #endif // defined(OS_CHROMEOS) |
| 613 |
| 606 virtual PrefProxyConfigTracker* GetProxyConfigTracker() { | 614 virtual PrefProxyConfigTracker* GetProxyConfigTracker() { |
| 607 return profile_->GetProxyConfigTracker(); | 615 return profile_->GetProxyConfigTracker(); |
| 608 } | 616 } |
| 609 | 617 |
| 610 virtual PrerenderManager* GetPrerenderManager() { | 618 virtual PrerenderManager* GetPrerenderManager() { |
| 611 // We do not allow prerendering in OTR profiles at this point. | 619 // We do not allow prerendering in OTR profiles at this point. |
| 612 // TODO(tburkard): Figure out if we want to support this, and how, at some | 620 // TODO(tburkard): Figure out if we want to support this, and how, at some |
| 613 // point in the future. | 621 // point in the future. |
| 614 return NULL; | 622 return NULL; |
| 615 } | 623 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 | 682 |
| 675 // The file_system context for this profile. | 683 // The file_system context for this profile. |
| 676 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; | 684 scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; |
| 677 | 685 |
| 678 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 686 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
| 679 }; | 687 }; |
| 680 | 688 |
| 681 Profile* Profile::CreateOffTheRecordProfile() { | 689 Profile* Profile::CreateOffTheRecordProfile() { |
| 682 return new OffTheRecordProfileImpl(this); | 690 return new OffTheRecordProfileImpl(this); |
| 683 } | 691 } |
| OLD | NEW |