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

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

Issue 249413002: chromeos: Clean up PowerManagerClient nits from r265058. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chromeos/dbus/fake_power_manager_client.cc ('k') | no next file » | 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/power_manager_client.h" 5 #include "chromeos/dbus/power_manager_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 void IdleActionImminentReceived(dbus::Signal* signal) { 496 void IdleActionImminentReceived(dbus::Signal* signal) {
497 dbus::MessageReader reader(signal); 497 dbus::MessageReader reader(signal);
498 power_manager::IdleActionImminent proto; 498 power_manager::IdleActionImminent proto;
499 if (!reader.PopArrayOfBytesAsProto(&proto)) { 499 if (!reader.PopArrayOfBytesAsProto(&proto)) {
500 LOG(ERROR) << "Unable to decode protocol buffer from " 500 LOG(ERROR) << "Unable to decode protocol buffer from "
501 << power_manager::kIdleActionImminentSignal << " signal"; 501 << power_manager::kIdleActionImminentSignal << " signal";
502 return; 502 return;
503 } 503 }
504 FOR_EACH_OBSERVER(Observer, observers_, 504 FOR_EACH_OBSERVER(Observer, observers_,
505 IdleActionImminent(base::TimeDelta::FromInternalValue( 505 IdleActionImminent(base::TimeDelta::FromInternalValue(
506 proto.time_until_idle_action()))); 506 proto.time_until_idle_action())));
507 } 507 }
508 508
509 void IdleActionDeferredReceived(dbus::Signal* signal) { 509 void IdleActionDeferredReceived(dbus::Signal* signal) {
510 FOR_EACH_OBSERVER(Observer, observers_, IdleActionDeferred()); 510 FOR_EACH_OBSERVER(Observer, observers_, IdleActionDeferred());
511 } 511 }
512 512
513 void InputEventReceived(dbus::Signal* signal) { 513 void InputEventReceived(dbus::Signal* signal) {
514 dbus::MessageReader reader(signal); 514 dbus::MessageReader reader(signal);
515 power_manager::InputEvent proto; 515 power_manager::InputEvent proto;
516 if (!reader.PopArrayOfBytesAsProto(&proto)) { 516 if (!reader.PopArrayOfBytesAsProto(&proto)) {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 // static 889 // static
890 PowerManagerClient* PowerManagerClient::Create( 890 PowerManagerClient* PowerManagerClient::Create(
891 DBusClientImplementationType type) { 891 DBusClientImplementationType type) {
892 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 892 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
893 return new PowerManagerClientImpl(); 893 return new PowerManagerClientImpl();
894 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 894 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
895 return new PowerManagerClientStubImpl(); 895 return new PowerManagerClientStubImpl();
896 } 896 }
897 897
898 } // namespace chromeos 898 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_power_manager_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698