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

Side by Side Diff: dbus/object_manager_unittest.cc

Issue 14696007: Warn on missing OVERRIDE/virtual everywhere, not just in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new regressions, attempt 3 Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "dbus/object_manager.h" 5 #include "dbus/object_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 test_service_->Stop(); 106 test_service_->Stop();
107 } 107 }
108 108
109 void MethodCallback(dbus::Response* response) { 109 void MethodCallback(dbus::Response* response) {
110 method_callback_called_ = true; 110 method_callback_called_ = true;
111 message_loop_.Quit(); 111 message_loop_.Quit();
112 } 112 }
113 113
114 protected: 114 protected:
115 // Called when an object is added. 115 // Called when an object is added.
116 void ObjectAdded(const dbus::ObjectPath& object_path, 116 virtual void ObjectAdded(const dbus::ObjectPath& object_path,
117 const std::string& interface_name) OVERRIDE { 117 const std::string& interface_name) OVERRIDE {
118 added_objects_.push_back(std::make_pair(object_path, interface_name)); 118 added_objects_.push_back(std::make_pair(object_path, interface_name));
119 message_loop_.Quit(); 119 message_loop_.Quit();
120 } 120 }
121 121
122 // Called when an object is removed. 122 // Called when an object is removed.
123 void ObjectRemoved(const dbus::ObjectPath& object_path, 123 virtual void ObjectRemoved(const dbus::ObjectPath& object_path,
124 const std::string& interface_name) OVERRIDE { 124 const std::string& interface_name) OVERRIDE {
125 removed_objects_.push_back(std::make_pair(object_path, interface_name)); 125 removed_objects_.push_back(std::make_pair(object_path, interface_name));
126 message_loop_.Quit(); 126 message_loop_.Quit();
127 } 127 }
128 128
129 // Called when a property value is updated. 129 // Called when a property value is updated.
130 void OnPropertyChanged(const dbus::ObjectPath& object_path, 130 void OnPropertyChanged(const dbus::ObjectPath& object_path,
131 const std::string& name) { 131 const std::string& name) {
132 updated_properties_.push_back(name); 132 updated_properties_.push_back(name);
133 message_loop_.Quit(); 133 message_loop_.Quit();
134 } 134 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 object_paths = object_manager_->GetObjects(); 331 object_paths = object_manager_->GetObjects();
332 ASSERT_EQ(1U, object_paths.size()); 332 ASSERT_EQ(1U, object_paths.size());
333 EXPECT_EQ(dbus::ObjectPath("/org/chromium/TestObject"), object_paths[0]); 333 EXPECT_EQ(dbus::ObjectPath("/org/chromium/TestObject"), object_paths[0]);
334 334
335 object_paths = 335 object_paths =
336 object_manager_->GetObjectsWithInterface("org.chromium.TestInterface"); 336 object_manager_->GetObjectsWithInterface("org.chromium.TestInterface");
337 ASSERT_EQ(1U, object_paths.size()); 337 ASSERT_EQ(1U, object_paths.size());
338 EXPECT_EQ(dbus::ObjectPath("/org/chromium/TestObject"), object_paths[0]); 338 EXPECT_EQ(dbus::ObjectPath("/org/chromium/TestObject"), object_paths[0]);
339 } 339 }
OLDNEW
« no previous file with comments | « content/renderer/resource_fetcher_browsertest.cc ('k') | net/quic/congestion_control/available_channel_estimator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698