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

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

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 6 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) 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/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 21 matching lines...) Expand all
32 Profile* Profile::FromBrowserContext(content::BrowserContext* browser_context) { 32 Profile* Profile::FromBrowserContext(content::BrowserContext* browser_context) {
33 // This is safe; this is the only implementation of the browser context. 33 // This is safe; this is the only implementation of the browser context.
34 return static_cast<Profile*>(browser_context); 34 return static_cast<Profile*>(browser_context);
35 } 35 }
36 36
37 // static 37 // static
38 Profile* Profile::FromWebUI(content::WebUI* web_ui) { 38 Profile* Profile::FromWebUI(content::WebUI* web_ui) {
39 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext()); 39 return FromBrowserContext(web_ui->GetWebContents()->GetBrowserContext());
40 } 40 }
41 41
42 bool Profile::ShouldSaveSessionStorageOnDisk() {
43 return false;
44 }
45
42 TestingProfile* Profile::AsTestingProfile() { 46 TestingProfile* Profile::AsTestingProfile() {
43 return NULL; 47 return NULL;
44 } 48 }
45 49
46 // static 50 // static
47 const char* const Profile::kProfileKey = "__PROFILE__"; 51 const char* const Profile::kProfileKey = "__PROFILE__";
48 52
49 // static 53 // static
50 void Profile::RegisterUserPrefs(PrefService* prefs) { 54 void Profile::RegisterUserPrefs(PrefService* prefs) {
51 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, 55 prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return is_guest_session; 125 return is_guest_session;
122 #else 126 #else
123 return false; 127 return false;
124 #endif 128 #endif
125 } 129 }
126 130
127 bool Profile::IsSyncAccessible() { 131 bool Profile::IsSyncAccessible() {
128 browser_sync::SyncPrefs prefs(GetPrefs()); 132 browser_sync::SyncPrefs prefs(GetPrefs());
129 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); 133 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged();
130 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698