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

Side by Side Diff: chrome/browser/web_resource/eula_accepted_notifier.h

Issue 739173002: Remove dependencies of ResourceRequestAllowedNotifier on chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and cleanup Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_ 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_
6 #define CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_ 6 #define CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 10
(...skipping 15 matching lines...) Expand all
26 // Initializes this class with the given |observer|. Must be called before 26 // Initializes this class with the given |observer|. Must be called before
27 // the class is used. 27 // the class is used.
28 void Init(Observer* observer); 28 void Init(Observer* observer);
29 29
30 // Returns true if the EULA has been accepted. If the EULA has not yet been 30 // Returns true if the EULA has been accepted. If the EULA has not yet been
31 // accepted, begins monitoring the EULA state and will notify the observer 31 // accepted, begins monitoring the EULA state and will notify the observer
32 // once the EULA has been accepted. 32 // once the EULA has been accepted.
33 virtual bool IsEulaAccepted(); 33 virtual bool IsEulaAccepted();
34 34
35 // Factory method for this class. 35 // Factory method for this class.
36 static EulaAcceptedNotifier* Create(); 36 static EulaAcceptedNotifier* Create(PrefService* local_state);
37 37
38 protected: 38 protected:
39 // Notifies the observer that the EULA has been updated, made protected for 39 // Notifies the observer that the EULA has been updated, made protected for
40 // testing. 40 // testing.
41 void NotifyObserver(); 41 void NotifyObserver();
42 42
43 private: 43 private:
44 // Callback for EULA accepted pref change notification. 44 // Callback for EULA accepted pref change notification.
45 void OnPrefChanged(); 45 void OnPrefChanged();
46 46
47 // Local state pref service for querying the EULA accepted pref. 47 // Local state pref service for querying the EULA accepted pref.
48 PrefService* local_state_; 48 PrefService* local_state_;
49 49
50 // Used to listen for the EULA accepted pref change notification. 50 // Used to listen for the EULA accepted pref change notification.
51 PrefChangeRegistrar registrar_; 51 PrefChangeRegistrar registrar_;
52 52
53 // Observer of the EULA accepted notification. 53 // Observer of the EULA accepted notification.
54 Observer* observer_; 54 Observer* observer_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(EulaAcceptedNotifier); 56 DISALLOW_COPY_AND_ASSIGN(EulaAcceptedNotifier);
57 }; 57 };
58 58
59 #endif // CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_ 59 #endif // CHROME_BROWSER_WEB_RESOURCE_EULA_ACCEPTED_NOTIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_service.cc ('k') | chrome/browser/web_resource/eula_accepted_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698