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

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

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fixes. Created 8 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 | 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_impl.h" 5 #include "chrome/browser/profiles/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/environment.h" 10 #include "base/environment.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "chrome/common/chrome_paths_internal.h" 78 #include "chrome/common/chrome_paths_internal.h"
79 #include "chrome/common/chrome_switches.h" 79 #include "chrome/common/chrome_switches.h"
80 #include "chrome/common/chrome_version_info.h" 80 #include "chrome/common/chrome_version_info.h"
81 #include "chrome/common/pref_names.h" 81 #include "chrome/common/pref_names.h"
82 #include "chrome/common/url_constants.h" 82 #include "chrome/common/url_constants.h"
83 #include "content/public/browser/browser_thread.h" 83 #include "content/public/browser/browser_thread.h"
84 #include "content/public/browser/dom_storage_context.h" 84 #include "content/public/browser/dom_storage_context.h"
85 #include "content/public/browser/host_zoom_map.h" 85 #include "content/public/browser/host_zoom_map.h"
86 #include "content/public/browser/notification_service.h" 86 #include "content/public/browser/notification_service.h"
87 #include "content/public/browser/render_process_host.h" 87 #include "content/public/browser/render_process_host.h"
88 #include "content/public/browser/storage_partition.h"
88 #include "content/public/browser/user_metrics.h" 89 #include "content/public/browser/user_metrics.h"
89 #include "grit/chromium_strings.h" 90 #include "grit/chromium_strings.h"
90 #include "grit/generated_resources.h" 91 #include "grit/generated_resources.h"
91 #include "ui/base/l10n/l10n_util.h" 92 #include "ui/base/l10n/l10n_util.h"
92 93
93 #if defined(ENABLE_CONFIGURATION_POLICY) 94 #if defined(ENABLE_CONFIGURATION_POLICY)
94 #include "chrome/browser/policy/browser_policy_connector.h" 95 #include "chrome/browser/policy/browser_policy_connector.h"
95 #else 96 #else
96 #include "chrome/browser/policy/policy_service_stub.h" 97 #include "chrome/browser/policy/policy_service_stub.h"
97 #endif // defined(ENABLE_CONFIGURATION_POLICY) 98 #endif // defined(ENABLE_CONFIGURATION_POLICY)
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 policy_service_.get(), 311 policy_service_.get(),
311 new ExtensionPrefStore( 312 new ExtensionPrefStore(
312 ExtensionPrefValueMapFactory::GetForProfile(this), false), 313 ExtensionPrefValueMapFactory::GetForProfile(this), false),
313 false)); 314 false));
314 OnPrefsLoaded(true); 315 OnPrefsLoaded(true);
315 } else { 316 } else {
316 NOTREACHED(); 317 NOTREACHED();
317 } 318 }
318 319
319 if (command_line->HasSwitch(switches::kEnableRestoreSessionState)) { 320 if (command_line->HasSwitch(switches::kEnableRestoreSessionState)) {
320 content::BrowserContext::GetDefaultDOMStorageContext(this)-> 321 // TODO(ajwong): This may be unsafe in the constructor as this calls back
321 SetSaveSessionStorageOnDisk(); 322 // into ExtensionService.
323 //
324 // http://crbug.com/142656
325 content::BrowserContext::GetDefaultStoragePartition(this)->
326 GetDOMStorageContext()->SetSaveSessionStorageOnDisk();
322 } 327 }
323 } 328 }
324 329
325 void ProfileImpl::DoFinalInit(bool is_new_profile) { 330 void ProfileImpl::DoFinalInit(bool is_new_profile) {
326 PrefService* prefs = GetPrefs(); 331 PrefService* prefs = GetPrefs();
327 pref_change_registrar_.Init(prefs); 332 pref_change_registrar_.Init(prefs);
328 pref_change_registrar_.Add(prefs::kGoogleServicesUsername, this); 333 pref_change_registrar_.Add(prefs::kGoogleServicesUsername, this);
329 pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this); 334 pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this);
330 pref_change_registrar_.Add(prefs::kProfileAvatarIndex, this); 335 pref_change_registrar_.Add(prefs::kProfileAvatarIndex, this);
331 pref_change_registrar_.Add(prefs::kProfileName, this); 336 pref_change_registrar_.Add(prefs::kProfileName, this);
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 if (!path.empty()) 1079 if (!path.empty())
1075 *cache_path = path; 1080 *cache_path = path;
1076 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1081 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1077 prefs_->GetInteger(prefs::kDiskCacheSize); 1082 prefs_->GetInteger(prefs::kDiskCacheSize);
1078 } 1083 }
1079 1084
1080 base::Callback<ChromeURLDataManagerBackend*(void)> 1085 base::Callback<ChromeURLDataManagerBackend*(void)>
1081 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { 1086 ProfileImpl::GetChromeURLDataManagerBackendGetter() const {
1082 return io_data_.GetChromeURLDataManagerBackendGetter(); 1087 return io_data_.GetChromeURLDataManagerBackendGetter();
1083 } 1088 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698