| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "chrome/browser/favicon_service.h" | 39 #include "chrome/browser/favicon_service.h" |
| 40 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 40 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 41 #include "chrome/browser/history/history.h" | 41 #include "chrome/browser/history/history.h" |
| 42 #include "chrome/browser/history/top_sites.h" | 42 #include "chrome/browser/history/top_sites.h" |
| 43 #include "chrome/browser/instant/instant_controller.h" | 43 #include "chrome/browser/instant/instant_controller.h" |
| 44 #include "chrome/browser/net/chrome_url_request_context.h" | 44 #include "chrome/browser/net/chrome_url_request_context.h" |
| 45 #include "chrome/browser/net/gaia/token_service.h" | 45 #include "chrome/browser/net/gaia/token_service.h" |
| 46 #include "chrome/browser/net/net_pref_observer.h" | 46 #include "chrome/browser/net/net_pref_observer.h" |
| 47 #include "chrome/browser/net/pref_proxy_config_service.h" | 47 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 48 #include "chrome/browser/net/ssl_config_service_manager.h" | 48 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 49 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 49 #include "chrome/browser/password_manager/password_store_default.h" | 50 #include "chrome/browser/password_manager/password_store_default.h" |
| 50 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 51 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 51 #include "chrome/browser/policy/configuration_policy_provider.h" | 52 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 52 #include "chrome/browser/policy/profile_policy_connector.h" | 53 #include "chrome/browser/policy/profile_policy_connector.h" |
| 53 #include "chrome/browser/prefs/browser_prefs.h" | 54 #include "chrome/browser/prefs/browser_prefs.h" |
| 54 #include "chrome/browser/prefs/pref_value_store.h" | 55 #include "chrome/browser/prefs/pref_value_store.h" |
| 55 #include "chrome/browser/prerender/prerender_manager.h" | 56 #include "chrome/browser/prerender/prerender_manager.h" |
| 56 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 57 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 57 #include "chrome/browser/profiles/profile_dependency_manager.h" | 58 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 58 #include "chrome/browser/profiles/profile_manager.h" | 59 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 | 1230 |
| 1230 WebKitContext* ProfileImpl::GetWebKitContext() { | 1231 WebKitContext* ProfileImpl::GetWebKitContext() { |
| 1231 if (!webkit_context_.get()) { | 1232 if (!webkit_context_.get()) { |
| 1232 webkit_context_ = new WebKitContext( | 1233 webkit_context_ = new WebKitContext( |
| 1233 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(), | 1234 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(), |
| 1234 clear_local_state_on_exit_); | 1235 clear_local_state_on_exit_); |
| 1235 } | 1236 } |
| 1236 return webkit_context_.get(); | 1237 return webkit_context_.get(); |
| 1237 } | 1238 } |
| 1238 | 1239 |
| 1240 DesktopNotificationService* ProfileImpl::GetDesktopNotificationService() { |
| 1241 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1242 if (!desktop_notification_service_.get()) { |
| 1243 desktop_notification_service_.reset(new DesktopNotificationService( |
| 1244 this, g_browser_process->notification_ui_manager())); |
| 1245 } |
| 1246 return desktop_notification_service_.get(); |
| 1247 } |
| 1248 |
| 1239 void ProfileImpl::MarkAsCleanShutdown() { | 1249 void ProfileImpl::MarkAsCleanShutdown() { |
| 1240 if (prefs_.get()) { | 1250 if (prefs_.get()) { |
| 1241 // The session cleanly exited, set kSessionExitedCleanly appropriately. | 1251 // The session cleanly exited, set kSessionExitedCleanly appropriately. |
| 1242 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); | 1252 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); |
| 1243 | 1253 |
| 1244 // NOTE: If you change what thread this writes on, be sure and update | 1254 // NOTE: If you change what thread this writes on, be sure and update |
| 1245 // ChromeFrame::EndSession(). | 1255 // ChromeFrame::EndSession(). |
| 1246 prefs_->SavePersistentPrefs(); | 1256 prefs_->SavePersistentPrefs(); |
| 1247 } | 1257 } |
| 1248 } | 1258 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 return pref_proxy_config_tracker_; | 1500 return pref_proxy_config_tracker_; |
| 1491 } | 1501 } |
| 1492 | 1502 |
| 1493 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1503 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1494 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1504 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1495 return NULL; | 1505 return NULL; |
| 1496 if (!prerender_manager_) | 1506 if (!prerender_manager_) |
| 1497 prerender_manager_ = new prerender::PrerenderManager(this); | 1507 prerender_manager_ = new prerender::PrerenderManager(this); |
| 1498 return prerender_manager_; | 1508 return prerender_manager_; |
| 1499 } | 1509 } |
| OLD | NEW |