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

Side by Side Diff: chromeos/dbus/system_clock_client.cc

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). 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
« no previous file with comments | « chromeos/dbus/system_clock_client.h ('k') | chromeos/dbus/update_engine_client.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 (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 "chromeos/dbus/system_clock_client.h" 5 #include "chromeos/dbus/system_clock_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "dbus/bus.h" 10 #include "dbus/bus.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 virtual void AddObserver(Observer* observer) override { 30 virtual void AddObserver(Observer* observer) override {
31 observers_.AddObserver(observer); 31 observers_.AddObserver(observer);
32 } 32 }
33 33
34 virtual void RemoveObserver(Observer* observer) override { 34 virtual void RemoveObserver(Observer* observer) override {
35 observers_.RemoveObserver(observer); 35 observers_.RemoveObserver(observer);
36 } 36 }
37 37
38 virtual bool HasObserver(Observer* observer) override { 38 virtual bool HasObserver(const Observer* observer) const override {
39 return observers_.HasObserver(observer); 39 return observers_.HasObserver(observer);
40 } 40 }
41 41
42 virtual void SetTime(int64 time_in_seconds) override { 42 virtual void SetTime(int64 time_in_seconds) override {
43 // Always try to set the time, because |can_set_time_| may be stale. 43 // Always try to set the time, because |can_set_time_| may be stale.
44 dbus::MethodCall method_call(system_clock::kSystemClockInterface, 44 dbus::MethodCall method_call(system_clock::kSystemClockInterface,
45 system_clock::kSystemClockSet); 45 system_clock::kSystemClockSet);
46 dbus::MessageWriter writer(&method_call); 46 dbus::MessageWriter writer(&method_call);
47 writer.AppendInt64(time_in_seconds); 47 writer.AppendInt64(time_in_seconds);
48 system_clock_proxy_->CallMethod(&method_call, 48 system_clock_proxy_->CallMethod(&method_call,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 SystemClockClient::~SystemClockClient() { 152 SystemClockClient::~SystemClockClient() {
153 } 153 }
154 154
155 // static 155 // static
156 SystemClockClient* SystemClockClient::Create() { 156 SystemClockClient* SystemClockClient::Create() {
157 return new SystemClockClientImpl(); 157 return new SystemClockClientImpl();
158 } 158 }
159 159
160 } // namespace chromeos 160 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/system_clock_client.h ('k') | chromeos/dbus/update_engine_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698