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

Side by Side Diff: chrome/browser/profile.cc

Issue 27354: Add FilePath setter/getter to pref service.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 SSLHostState* ProfileImpl::GetSSLHostState() { 535 SSLHostState* ProfileImpl::GetSSLHostState() {
536 if (!ssl_host_state_.get()) 536 if (!ssl_host_state_.get())
537 ssl_host_state_.reset(new SSLHostState()); 537 ssl_host_state_.reset(new SSLHostState());
538 538
539 DCHECK(ssl_host_state_->CalledOnValidThread()); 539 DCHECK(ssl_host_state_->CalledOnValidThread());
540 return ssl_host_state_.get(); 540 return ssl_host_state_.get();
541 } 541 }
542 542
543 PrefService* ProfileImpl::GetPrefs() { 543 PrefService* ProfileImpl::GetPrefs() {
544 if (!prefs_.get()) { 544 if (!prefs_.get()) {
545 prefs_.reset(new PrefService(GetPrefFilePath().ToWStringHack())); 545 prefs_.reset(new PrefService(GetPrefFilePath()));
546 546
547 // The Profile class and ProfileManager class may read some prefs so 547 // The Profile class and ProfileManager class may read some prefs so
548 // register known prefs as soon as possible. 548 // register known prefs as soon as possible.
549 Profile::RegisterUserPrefs(prefs_.get()); 549 Profile::RegisterUserPrefs(prefs_.get());
550 ProfileManager::RegisterUserPrefs(prefs_.get()); 550 ProfileManager::RegisterUserPrefs(prefs_.get());
551 551
552 // The last session exited cleanly if there is no pref for 552 // The last session exited cleanly if there is no pref for
553 // kSessionExitedCleanly or the value for kSessionExitedCleanly is true. 553 // kSessionExitedCleanly or the value for kSessionExitedCleanly is true.
554 last_session_exited_cleanly_ = 554 last_session_exited_cleanly_ =
555 prefs_->GetBoolean(prefs::kSessionExitedCleanly); 555 prefs_->GetBoolean(prefs::kSessionExitedCleanly);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 861 }
862 862
863 #ifdef CHROME_PERSONALIZATION 863 #ifdef CHROME_PERSONALIZATION
864 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { 864 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
865 if (!personalization_.get()) 865 if (!personalization_.get())
866 personalization_.reset( 866 personalization_.reset(
867 Personalization::CreateProfilePersonalization(this)); 867 Personalization::CreateProfilePersonalization(this));
868 return personalization_.get(); 868 return personalization_.get();
869 } 869 }
870 #endif 870 #endif
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service_uitest.cc ('k') | chrome/browser/tab_contents/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698