forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove content::NotificationObserver dependency from most Prefs code.
Instead of using content::NotificationObserver, introduce specific type-safe observer classes and update users to use them. In a very large number of cases this was the users' only reason for being a content::NotificationObserver and they would have a lot of boiler-plate code such as a DCHECK on the notification type and unpacking of the generic NotificationDetails types, so this change removes a bunch of boilerplate and introduces more type safety. This is part of enabling more of the Prefs code to live in base/prefs/. TBR=ben@chromium.org,brettw@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11345008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165414 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
joi@chromium.org
committed
Nov 1, 2012
1 parent
38d455b
commit a6a7ced
Showing
194 changed files
with
1,437 additions
and
1,516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef BASE_PREFS_PUBLIC_PREF_OBSERVER_H_ | ||
#define BASE_PREFS_PUBLIC_PREF_OBSERVER_H_ | ||
|
||
#include <string> | ||
|
||
class PrefServiceBase; | ||
|
||
// TODO(joi): Switch to base::Callback and remove this. | ||
class PrefObserver { | ||
public: | ||
virtual void OnPreferenceChanged(PrefServiceBase* service, | ||
const std::string& pref_name) = 0; | ||
}; | ||
|
||
#endif // BASE_PREFS_PUBLIC_PREF_OBSERVER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.