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

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

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 8 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) 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
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"
50 #include "chrome/browser/password_manager/password_store_default.h" 49 #include "chrome/browser/password_manager/password_store_default.h"
51 #include "chrome/browser/policy/configuration_policy_pref_store.h" 50 #include "chrome/browser/policy/configuration_policy_pref_store.h"
52 #include "chrome/browser/policy/configuration_policy_provider.h" 51 #include "chrome/browser/policy/configuration_policy_provider.h"
53 #include "chrome/browser/policy/profile_policy_connector.h" 52 #include "chrome/browser/policy/profile_policy_connector.h"
54 #include "chrome/browser/prefs/browser_prefs.h" 53 #include "chrome/browser/prefs/browser_prefs.h"
55 #include "chrome/browser/prefs/pref_value_store.h" 54 #include "chrome/browser/prefs/pref_value_store.h"
56 #include "chrome/browser/prerender/prerender_manager.h" 55 #include "chrome/browser/prerender/prerender_manager.h"
57 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 56 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
58 #include "chrome/browser/profiles/profile_dependency_manager.h" 57 #include "chrome/browser/profiles/profile_dependency_manager.h"
59 #include "chrome/browser/profiles/profile_manager.h" 58 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 1229
1231 WebKitContext* ProfileImpl::GetWebKitContext() { 1230 WebKitContext* ProfileImpl::GetWebKitContext() {
1232 if (!webkit_context_.get()) { 1231 if (!webkit_context_.get()) {
1233 webkit_context_ = new WebKitContext( 1232 webkit_context_ = new WebKitContext(
1234 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(), 1233 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(),
1235 clear_local_state_on_exit_); 1234 clear_local_state_on_exit_);
1236 } 1235 }
1237 return webkit_context_.get(); 1236 return webkit_context_.get();
1238 } 1237 }
1239 1238
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
1249 void ProfileImpl::MarkAsCleanShutdown() { 1239 void ProfileImpl::MarkAsCleanShutdown() {
1250 if (prefs_.get()) { 1240 if (prefs_.get()) {
1251 // The session cleanly exited, set kSessionExitedCleanly appropriately. 1241 // The session cleanly exited, set kSessionExitedCleanly appropriately.
1252 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); 1242 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true);
1253 1243
1254 // NOTE: If you change what thread this writes on, be sure and update 1244 // NOTE: If you change what thread this writes on, be sure and update
1255 // ChromeFrame::EndSession(). 1245 // ChromeFrame::EndSession().
1256 prefs_->SavePersistentPrefs(); 1246 prefs_->SavePersistentPrefs();
1257 } 1247 }
1258 } 1248 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 return pref_proxy_config_tracker_; 1490 return pref_proxy_config_tracker_;
1501 } 1491 }
1502 1492
1503 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { 1493 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() {
1504 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1494 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1505 return NULL; 1495 return NULL;
1506 if (!prerender_manager_) 1496 if (!prerender_manager_)
1507 prerender_manager_ = new prerender::PrerenderManager(this); 1497 prerender_manager_ = new prerender::PrerenderManager(this);
1508 return prerender_manager_; 1498 return prerender_manager_;
1509 } 1499 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_keyed_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698