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

Side by Side Diff: extensions/browser/event_router_unittest.cc

Issue 622343002: replace OVERRIDE and FINAL with override and final in 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
« no previous file with comments | « extensions/browser/event_router.h ('k') | extensions/browser/extension_error.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/browser/event_router.h" 5 #include "extensions/browser/event_router.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 20 matching lines...) Expand all
31 int listener_removed_count() const { return listener_removed_count_; } 31 int listener_removed_count() const { return listener_removed_count_; }
32 const std::string& last_event_name() const { return last_event_name_; } 32 const std::string& last_event_name() const { return last_event_name_; }
33 33
34 void Reset() { 34 void Reset() {
35 listener_added_count_ = 0; 35 listener_added_count_ = 0;
36 listener_removed_count_ = 0; 36 listener_removed_count_ = 0;
37 last_event_name_.clear(); 37 last_event_name_.clear();
38 } 38 }
39 39
40 // EventRouter::Observer overrides: 40 // EventRouter::Observer overrides:
41 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE { 41 virtual void OnListenerAdded(const EventListenerInfo& details) override {
42 listener_added_count_++; 42 listener_added_count_++;
43 last_event_name_ = details.event_name; 43 last_event_name_ = details.event_name;
44 } 44 }
45 45
46 virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE { 46 virtual void OnListenerRemoved(const EventListenerInfo& details) override {
47 listener_removed_count_++; 47 listener_removed_count_++;
48 last_event_name_ = details.event_name; 48 last_event_name_ = details.event_name;
49 } 49 }
50 50
51 private: 51 private:
52 int listener_added_count_; 52 int listener_added_count_;
53 int listener_removed_count_; 53 int listener_removed_count_;
54 std::string last_event_name_; 54 std::string last_event_name_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(MockEventRouterObserver); 56 DISALLOW_COPY_AND_ASSIGN(MockEventRouterObserver);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 RunEventRouterObserverTest( 164 RunEventRouterObserverTest(
165 base::Bind(&CreateEventListenerForExtension, "extension_id")); 165 base::Bind(&CreateEventListenerForExtension, "extension_id"));
166 } 166 }
167 167
168 TEST_F(EventRouterTest, EventRouterObserverForURLs) { 168 TEST_F(EventRouterTest, EventRouterObserverForURLs) {
169 RunEventRouterObserverTest( 169 RunEventRouterObserverTest(
170 base::Bind(&CreateEventListenerForURL, GURL("http://google.com/path"))); 170 base::Bind(&CreateEventListenerForURL, GURL("http://google.com/path")));
171 } 171 }
172 172
173 } // namespace extensions 173 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/event_router.h ('k') | extensions/browser/extension_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698