OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_impl.h" | 5 #include "chrome/browser/profile_impl.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 // time the user exited. | 1082 // time the user exited. |
1083 GetSessionService(); | 1083 GetSessionService(); |
1084 shutdown_session_service_ = true; | 1084 shutdown_session_service_ = true; |
1085 session_service_ = NULL; | 1085 session_service_ = NULL; |
1086 } | 1086 } |
1087 | 1087 |
1088 bool ProfileImpl::HasSessionService() const { | 1088 bool ProfileImpl::HasSessionService() const { |
1089 return (session_service_.get() != NULL); | 1089 return (session_service_.get() != NULL); |
1090 } | 1090 } |
1091 | 1091 |
| 1092 bool ProfileImpl::HasProfileSyncService() const { |
| 1093 return (sync_service_.get() != NULL); |
| 1094 } |
| 1095 |
1092 bool ProfileImpl::DidLastSessionExitCleanly() { | 1096 bool ProfileImpl::DidLastSessionExitCleanly() { |
1093 // last_session_exited_cleanly_ is set when the preferences are loaded. Force | 1097 // last_session_exited_cleanly_ is set when the preferences are loaded. Force |
1094 // it to be set by asking for the prefs. | 1098 // it to be set by asking for the prefs. |
1095 GetPrefs(); | 1099 GetPrefs(); |
1096 return last_session_exited_cleanly_; | 1100 return last_session_exited_cleanly_; |
1097 } | 1101 } |
1098 | 1102 |
1099 BookmarkModel* ProfileImpl::GetBookmarkModel() { | 1103 BookmarkModel* ProfileImpl::GetBookmarkModel() { |
1100 if (!bookmark_bar_model_.get()) { | 1104 if (!bookmark_bar_model_.get()) { |
1101 bookmark_bar_model_.reset(new BookmarkModel(this)); | 1105 bookmark_bar_model_.reset(new BookmarkModel(this)); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 #if defined(OS_CHROMEOS) | 1304 #if defined(OS_CHROMEOS) |
1301 chromeos::ProxyConfigServiceImpl* | 1305 chromeos::ProxyConfigServiceImpl* |
1302 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1306 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
1303 if (!chromeos_proxy_config_service_impl_) { | 1307 if (!chromeos_proxy_config_service_impl_) { |
1304 chromeos_proxy_config_service_impl_ = | 1308 chromeos_proxy_config_service_impl_ = |
1305 new chromeos::ProxyConfigServiceImpl(); | 1309 new chromeos::ProxyConfigServiceImpl(); |
1306 } | 1310 } |
1307 return chromeos_proxy_config_service_impl_; | 1311 return chromeos_proxy_config_service_impl_; |
1308 } | 1312 } |
1309 #endif // defined(OS_CHROMEOS) | 1313 #endif // defined(OS_CHROMEOS) |
OLD | NEW |