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

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

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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/amplifier_client.h ('k') | chromeos/dbus/ap_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/amplifier_client.h" 5 #include "chromeos/dbus/amplifier_client.h"
6 6
7 #include <stdint.h>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h"
8 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
10 #include "base/observer_list.h" 13 #include "base/observer_list.h"
11 #include "dbus/bus.h" 14 #include "dbus/bus.h"
12 #include "dbus/message.h" 15 #include "dbus/message.h"
13 #include "dbus/object_path.h" 16 #include "dbus/object_path.h"
14 #include "dbus/object_proxy.h" 17 #include "dbus/object_proxy.h"
15 18
16 namespace chromeos { 19 namespace chromeos {
17 namespace { 20 namespace {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 amplifier::kSetVolumeMethod); 150 amplifier::kSetVolumeMethod);
148 dbus::MessageWriter writer(&method_call); 151 dbus::MessageWriter writer(&method_call);
149 writer.AppendDouble(db_spl); 152 writer.AppendDouble(db_spl);
150 DCHECK(proxy_); 153 DCHECK(proxy_);
151 proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, 154 proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
152 base::Bind(&OnVoidDBusMethod, callback)); 155 base::Bind(&OnVoidDBusMethod, callback));
153 } 156 }
154 157
155 void AmplifierClientImpl::OnError(dbus::Signal* signal) { 158 void AmplifierClientImpl::OnError(dbus::Signal* signal) {
156 dbus::MessageReader reader(signal); 159 dbus::MessageReader reader(signal);
157 int32 error_code = 0; 160 int32_t error_code = 0;
158 if (!reader.PopInt32(&error_code)) { 161 if (!reader.PopInt32(&error_code)) {
159 LOG(ERROR) << "Invalid signal: " << signal->ToString(); 162 LOG(ERROR) << "Invalid signal: " << signal->ToString();
160 return; 163 return;
161 } 164 }
162 FOR_EACH_OBSERVER(Observer, observers_, OnError(error_code)); 165 FOR_EACH_OBSERVER(Observer, observers_, OnError(error_code));
163 } 166 }
164 167
165 void AmplifierClientImpl::OnSignalConnected(const std::string& interface, 168 void AmplifierClientImpl::OnSignalConnected(const std::string& interface,
166 const std::string& signal, 169 const std::string& signal,
167 bool succeeded) { 170 bool succeeded) {
168 LOG_IF(ERROR, !succeeded) << "Connect to " << interface << " " << signal 171 LOG_IF(ERROR, !succeeded) << "Connect to " << interface << " " << signal
169 << " failed."; 172 << " failed.";
170 } 173 }
171 174
172 } // anonymous namespace 175 } // anonymous namespace
173 176
174 AmplifierClient::AmplifierClient() { 177 AmplifierClient::AmplifierClient() {
175 } 178 }
176 179
177 AmplifierClient::~AmplifierClient() { 180 AmplifierClient::~AmplifierClient() {
178 } 181 }
179 182
180 // static 183 // static
181 AmplifierClient* AmplifierClient::Create() { 184 AmplifierClient* AmplifierClient::Create() {
182 return new AmplifierClientImpl(); 185 return new AmplifierClientImpl();
183 } 186 }
184 187
185 } // namespace chromeos 188 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/amplifier_client.h ('k') | chromeos/dbus/ap_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698