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

Side by Side Diff: chrome/browser/extensions/extension_test_notification_observer.h

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return last_loaded_extension_id_; 73 return last_loaded_extension_id_;
74 } 74 }
75 void set_last_loaded_extension_id( 75 void set_last_loaded_extension_id(
76 const std::string& last_loaded_extension_id) { 76 const std::string& last_loaded_extension_id) {
77 last_loaded_extension_id_ = last_loaded_extension_id; 77 last_loaded_extension_id_ = last_loaded_extension_id;
78 } 78 }
79 79
80 // content::NotificationObserver 80 // content::NotificationObserver
81 virtual void Observe(int type, 81 virtual void Observe(int type,
82 const content::NotificationSource& source, 82 const content::NotificationSource& source,
83 const content::NotificationDetails& details) OVERRIDE; 83 const content::NotificationDetails& details) override;
84 84
85 private: 85 private:
86 class NotificationSet; 86 class NotificationSet;
87 87
88 Profile* GetProfile(); 88 Profile* GetProfile();
89 89
90 void WaitForNotification(int notification_type); 90 void WaitForNotification(int notification_type);
91 91
92 // Wait for |condition_| to be met. |notification_set| is the set of 92 // Wait for |condition_| to be met. |notification_set| is the set of
93 // notifications to wait for and to check |condition| when observing. This 93 // notifications to wait for and to check |condition| when observing. This
94 // can be NULL if we are instead waiting for a different observer method, like 94 // can be NULL if we are instead waiting for a different observer method, like
95 // OnPageActionsUpdated(). 95 // OnPageActionsUpdated().
96 void WaitForCondition(const base::Callback<bool(void)>& condition, 96 void WaitForCondition(const base::Callback<bool(void)>& condition,
97 NotificationSet* notification_set); 97 NotificationSet* notification_set);
98 98
99 // Quits the message loop if |condition_| is met. 99 // Quits the message loop if |condition_| is met.
100 void MaybeQuit(); 100 void MaybeQuit();
101 101
102 // extensions::ExtensionActionAPI::Observer: 102 // extensions::ExtensionActionAPI::Observer:
103 virtual void OnPageActionsUpdated(content::WebContents* contents) OVERRIDE; 103 virtual void OnPageActionsUpdated(content::WebContents* contents) override;
104 104
105 Browser* browser_; 105 Browser* browser_;
106 Profile* profile_; 106 Profile* profile_;
107 107
108 content::NotificationRegistrar registrar_; 108 content::NotificationRegistrar registrar_;
109 scoped_ptr<content::WindowedNotificationObserver> observer_; 109 scoped_ptr<content::WindowedNotificationObserver> observer_;
110 110
111 std::string last_loaded_extension_id_; 111 std::string last_loaded_extension_id_;
112 int extension_installs_observed_; 112 int extension_installs_observed_;
113 int extension_load_errors_observed_; 113 int extension_load_errors_observed_;
114 int crx_installers_done_observed_; 114 int crx_installers_done_observed_;
115 115
116 // The condition for which we are waiting. This should be checked in any 116 // The condition for which we are waiting. This should be checked in any
117 // observing methods that could trigger it. 117 // observing methods that could trigger it.
118 base::Callback<bool(void)> condition_; 118 base::Callback<bool(void)> condition_;
119 119
120 // The closure to quit the currently-running message loop. 120 // The closure to quit the currently-running message loop.
121 base::Closure quit_closure_; 121 base::Closure quit_closure_;
122 }; 122 };
123 123
124 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_ 124 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_NOTIFICATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_apitest.cc ('k') | chrome/browser/extensions/extension_test_notification_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698