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

Side by Side Diff: chrome/browser/prefs/pref_notifier_impl.cc

Issue 10559052: Split mode incognito extension can get misleading pref changed events from regular mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed some callbacks, other nits Created 8 years, 6 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) 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/prefs/pref_notifier_impl.h" 5 #include "chrome/browser/prefs/pref_notifier_impl.h"
6 6
7 #include "base/logging.h"
7 #include "base/stl_util.h" 8 #include "base/stl_util.h"
8 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
12 13
13 PrefNotifierImpl::PrefNotifierImpl() 14 PrefNotifierImpl::PrefNotifierImpl()
14 : pref_service_(NULL) { 15 : pref_service_(NULL) {
15 } 16 }
16 17
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 observer->Observe(chrome::NOTIFICATION_PREF_CHANGED, 107 observer->Observe(chrome::NOTIFICATION_PREF_CHANGED,
107 content::Source<PrefService>(pref_service_), 108 content::Source<PrefService>(pref_service_),
108 content::Details<const std::string>(&path)); 109 content::Details<const std::string>(&path));
109 } 110 }
110 } 111 }
111 112
112 void PrefNotifierImpl::SetPrefService(PrefService* pref_service) { 113 void PrefNotifierImpl::SetPrefService(PrefService* pref_service) {
113 DCHECK(pref_service_ == NULL); 114 DCHECK(pref_service_ == NULL);
114 pref_service_ = pref_service; 115 pref_service_ = pref_service;
115 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/test/data/extensions/api_test/preference/onchange/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698