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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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
OLDNEW
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/notifications/desktop_notification_service.h" 5 #include "chrome/browser/notifications/desktop_notification_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 27 matching lines...) Expand all
38 #endif 38 #endif
39 39
40 using content::BrowserThread; 40 using content::BrowserThread;
41 using message_center::NotifierId; 41 using message_center::NotifierId;
42 42
43 // DesktopNotificationService ------------------------------------------------- 43 // DesktopNotificationService -------------------------------------------------
44 44
45 // static 45 // static
46 void DesktopNotificationService::RegisterProfilePrefs( 46 void DesktopNotificationService::RegisterProfilePrefs(
47 user_prefs::PrefRegistrySyncable* registry) { 47 user_prefs::PrefRegistrySyncable* registry) {
48 registry->RegisterListPref( 48 registry->RegisterListPref(prefs::kMessageCenterDisabledExtensionIds);
49 prefs::kMessageCenterDisabledExtensionIds, 49 registry->RegisterListPref(prefs::kMessageCenterDisabledSystemComponentIds);
50 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
51 registry->RegisterListPref(
52 prefs::kMessageCenterDisabledSystemComponentIds,
53 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
54 } 50 }
55 51
56 DesktopNotificationService::DesktopNotificationService(Profile* profile) 52 DesktopNotificationService::DesktopNotificationService(Profile* profile)
57 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_NOTIFICATIONS), 53 : PermissionContextBase(profile, CONTENT_SETTINGS_TYPE_NOTIFICATIONS),
58 profile_(profile) 54 profile_(profile)
59 #if defined(ENABLE_EXTENSIONS) 55 #if defined(ENABLE_EXTENSIONS)
60 , 56 ,
61 extension_registry_observer_(this) 57 extension_registry_observer_(this)
62 #endif 58 #endif
63 { 59 {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Tell the IO thread that this extension's permission for notifications 272 // Tell the IO thread that this extension's permission for notifications
277 // has changed. 273 // has changed.
278 extensions::InfoMap* extension_info_map = 274 extensions::InfoMap* extension_info_map =
279 extensions::ExtensionSystem::Get(profile_)->info_map(); 275 extensions::ExtensionSystem::Get(profile_)->info_map();
280 BrowserThread::PostTask( 276 BrowserThread::PostTask(
281 BrowserThread::IO, FROM_HERE, 277 BrowserThread::IO, FROM_HERE,
282 base::Bind(&extensions::InfoMap::SetNotificationsDisabled, 278 base::Bind(&extensions::InfoMap::SetNotificationsDisabled,
283 extension_info_map, notifier_id.id, !enabled)); 279 extension_info_map, notifier_id.id, !enabled));
284 #endif 280 #endif
285 } 281 }
OLDNEW
« no previous file with comments | « chrome/browser/net/pref_proxy_config_tracker_impl.cc ('k') | chrome/browser/notifications/extension_welcome_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698