OLD | NEW |
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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // last_session_exited_cleanly_ is set when the preferences are loaded. Force | 832 // last_session_exited_cleanly_ is set when the preferences are loaded. Force |
833 // it to be set by asking for the prefs. | 833 // it to be set by asking for the prefs. |
834 GetPrefs(); | 834 GetPrefs(); |
835 return last_session_exited_cleanly_; | 835 return last_session_exited_cleanly_; |
836 } | 836 } |
837 | 837 |
838 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { | 838 quota::SpecialStoragePolicy* ProfileImpl::GetSpecialStoragePolicy() { |
839 return GetExtensionSpecialStoragePolicy(); | 839 return GetExtensionSpecialStoragePolicy(); |
840 } | 840 } |
841 | 841 |
| 842 bool ProfileImpl::ShouldSaveSessionStorageOnDisk() { |
| 843 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 844 switches::kEnableRestoreSessionState); |
| 845 } |
| 846 |
842 BookmarkModel* ProfileImpl::GetBookmarkModel() { | 847 BookmarkModel* ProfileImpl::GetBookmarkModel() { |
843 if (!bookmark_bar_model_.get()) { | 848 if (!bookmark_bar_model_.get()) { |
844 bookmark_bar_model_.reset(new BookmarkModel(this)); | 849 bookmark_bar_model_.reset(new BookmarkModel(this)); |
845 bookmark_bar_model_->Load(); | 850 bookmark_bar_model_->Load(); |
846 } | 851 } |
847 return bookmark_bar_model_.get(); | 852 return bookmark_bar_model_.get(); |
848 } | 853 } |
849 | 854 |
850 ProtocolHandlerRegistry* ProfileImpl::GetProtocolHandlerRegistry() { | 855 ProtocolHandlerRegistry* ProfileImpl::GetProtocolHandlerRegistry() { |
851 return protocol_handler_registry_.get(); | 856 return protocol_handler_registry_.get(); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 if (!path.empty()) | 1152 if (!path.empty()) |
1148 *cache_path = path; | 1153 *cache_path = path; |
1149 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1154 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1150 prefs_->GetInteger(prefs::kDiskCacheSize); | 1155 prefs_->GetInteger(prefs::kDiskCacheSize); |
1151 } | 1156 } |
1152 | 1157 |
1153 base::Callback<ChromeURLDataManagerBackend*(void)> | 1158 base::Callback<ChromeURLDataManagerBackend*(void)> |
1154 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1159 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1155 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1160 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1156 } | 1161 } |
OLD | NEW |