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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 9447034: Android: Guard off desktop notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing rebase Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 1fb0c156cca6b6fa9a5cefad65e0de38354401d6..be8ae725fe23eef4a58d10067b24b3e9f1f23085 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -223,8 +223,12 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
params->cookie_monster_delegate =
new ChromeCookieMonsterDelegate(profile_getter);
params->extension_info_map = profile->GetExtensionInfoMap();
+
+#if defined(ENABLE_NOTIFICATIONS)
params->notification_service =
DesktopNotificationServiceFactory::GetForProfile(profile);
+#endif
+
params->protocol_handler_registry = profile->GetProtocolHandlerRegistry();
ChromeProxyConfigService* proxy_config_service =
@@ -271,7 +275,9 @@ ProfileIOData::ProfileParams::ProfileParams()
: is_incognito(false),
clear_local_state_on_exit(false),
io_thread(NULL),
+#if defined(ENABLE_NOTIFICATIONS)
notification_service(NULL),
+#endif
profile(NULL) {}
ProfileIOData::ProfileParams::~ProfileParams() {}
@@ -381,9 +387,11 @@ CookieSettings* ProfileIOData::GetCookieSettings() const {
return cookie_settings_;
}
+#if defined(ENABLE_NOTIFICATIONS)
DesktopNotificationService* ProfileIOData::GetNotificationService() const {
return notification_service_;
}
+#endif
ProfileIOData::ResourceContext::ResourceContext(ProfileIOData* io_data)
: io_data_(io_data) {
@@ -507,7 +515,9 @@ void ProfileIOData::LazyInitialize() const {
// Take ownership over these parameters.
host_content_settings_map_ = profile_params_->host_content_settings_map;
cookie_settings_ = profile_params_->cookie_settings;
+#if defined(ENABLE_NOTIFICATIONS)
notification_service_ = profile_params_->notification_service;
+#endif
extension_info_map_ = profile_params_->extension_info_map;
resource_context_.host_resolver_ = io_thread_globals->host_resolver.get();
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698