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 "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 Profile::Profile() | 81 Profile::Profile() |
82 : restored_last_session_(false), | 82 : restored_last_session_(false), |
83 accessibility_pause_level_(0) { | 83 accessibility_pause_level_(0) { |
84 } | 84 } |
85 | 85 |
86 // static | 86 // static |
87 const char* Profile::kProfileKey = "__PROFILE__"; | 87 const char* Profile::kProfileKey = "__PROFILE__"; |
88 | 88 |
89 // static | 89 // static |
90 const ProfileId Profile::InvalidProfileId = static_cast<ProfileId>(0); | 90 const ProfileId Profile::kInvalidProfileId = static_cast<ProfileId>(0); |
91 | 91 |
92 // static | 92 // static |
93 void Profile::RegisterUserPrefs(PrefService* prefs) { | 93 void Profile::RegisterUserPrefs(PrefService* prefs) { |
94 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true); | 94 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true); |
95 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); | 95 prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); |
96 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, true); | 96 prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, true); |
97 prefs->RegisterBooleanPref(prefs::kSafeBrowsingReportingEnabled, false); | 97 prefs->RegisterBooleanPref(prefs::kSafeBrowsingReportingEnabled, false); |
98 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. | 98 // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. |
99 prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary, | 99 prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary, |
100 IDS_SPELLCHECK_DICTIONARY); | 100 IDS_SPELLCHECK_DICTIONARY); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } | 279 } |
280 | 280 |
281 virtual ExtensionMessageService* GetExtensionMessageService() { | 281 virtual ExtensionMessageService* GetExtensionMessageService() { |
282 return GetOriginalProfile()->GetExtensionMessageService(); | 282 return GetOriginalProfile()->GetExtensionMessageService(); |
283 } | 283 } |
284 | 284 |
285 virtual ExtensionEventRouter* GetExtensionEventRouter() { | 285 virtual ExtensionEventRouter* GetExtensionEventRouter() { |
286 return GetOriginalProfile()->GetExtensionEventRouter(); | 286 return GetOriginalProfile()->GetExtensionEventRouter(); |
287 } | 287 } |
288 | 288 |
289 virtual ExtensionIOEventRouter* GetExtensionIOEventRouter() { | |
290 return GetOriginalProfile()->GetExtensionIOEventRouter(); | |
291 } | |
292 | |
293 virtual ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() { | 289 virtual ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() { |
294 return GetOriginalProfile()->GetExtensionSpecialStoragePolicy(); | 290 return GetOriginalProfile()->GetExtensionSpecialStoragePolicy(); |
295 } | 291 } |
296 | 292 |
297 virtual SSLHostState* GetSSLHostState() { | 293 virtual SSLHostState* GetSSLHostState() { |
298 if (!ssl_host_state_.get()) | 294 if (!ssl_host_state_.get()) |
299 ssl_host_state_.reset(new SSLHostState()); | 295 ssl_host_state_.reset(new SSLHostState()); |
300 | 296 |
301 DCHECK(ssl_host_state_->CalledOnValidThread()); | 297 DCHECK(ssl_host_state_->CalledOnValidThread()); |
302 return ssl_host_state_.get(); | 298 return ssl_host_state_.get(); |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 }; | 769 }; |
774 #endif | 770 #endif |
775 | 771 |
776 Profile* Profile::CreateOffTheRecordProfile() { | 772 Profile* Profile::CreateOffTheRecordProfile() { |
777 #if defined(OS_CHROMEOS) | 773 #if defined(OS_CHROMEOS) |
778 if (Profile::IsGuestSession()) | 774 if (Profile::IsGuestSession()) |
779 return new GuestSessionProfile(this); | 775 return new GuestSessionProfile(this); |
780 #endif | 776 #endif |
781 return new OffTheRecordProfileImpl(this); | 777 return new OffTheRecordProfileImpl(this); |
782 } | 778 } |
OLD | NEW |