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

Side by Side Diff: chromeos/dbus/fake_update_engine_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/fake_update_engine_client.h ('k') | chromeos/dbus/mock_session_manager_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fake_update_engine_client.h" 5 #include "chromeos/dbus/fake_update_engine_client.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 8
9 FakeUpdateEngineClient::FakeUpdateEngineClient() 9 FakeUpdateEngineClient::FakeUpdateEngineClient()
10 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS), 10 : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS),
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void FakeUpdateEngineClient::AddObserver(Observer* observer) { 24 void FakeUpdateEngineClient::AddObserver(Observer* observer) {
25 observers_.AddObserver(observer); 25 observers_.AddObserver(observer);
26 } 26 }
27 27
28 void FakeUpdateEngineClient::RemoveObserver(Observer* observer) { 28 void FakeUpdateEngineClient::RemoveObserver(Observer* observer) {
29 observers_.RemoveObserver(observer); 29 observers_.RemoveObserver(observer);
30 } 30 }
31 31
32 bool FakeUpdateEngineClient::HasObserver(Observer* observer) { 32 bool FakeUpdateEngineClient::HasObserver(const Observer* observer) const {
33 return observers_.HasObserver(observer); 33 return observers_.HasObserver(observer);
34 } 34 }
35 35
36 void FakeUpdateEngineClient::RequestUpdateCheck( 36 void FakeUpdateEngineClient::RequestUpdateCheck(
37 const UpdateCheckCallback& callback) { 37 const UpdateCheckCallback& callback) {
38 request_update_check_call_count_++; 38 request_update_check_call_count_++;
39 callback.Run(update_check_result_); 39 callback.Run(update_check_result_);
40 } 40 }
41 41
42 void FakeUpdateEngineClient::Rollback() { 42 void FakeUpdateEngineClient::Rollback() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const UpdateEngineClient::Status& status) { 79 const UpdateEngineClient::Status& status) {
80 default_status_ = status; 80 default_status_ = status;
81 } 81 }
82 82
83 void FakeUpdateEngineClient::set_update_check_result( 83 void FakeUpdateEngineClient::set_update_check_result(
84 const UpdateEngineClient::UpdateCheckResult& result) { 84 const UpdateEngineClient::UpdateCheckResult& result) {
85 update_check_result_ = result; 85 update_check_result_ = result;
86 } 86 }
87 87
88 } // namespace chromeos 88 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_update_engine_client.h ('k') | chromeos/dbus/mock_session_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698