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

Side by Side Diff: chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.cc

Issue 10899037: Refactoring bluetooth API code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added #include <string> into bluetooth_adapter_dbus.cc. Created 8 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h"
7 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h"
8
9 namespace chromeos {
10
11 MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
12 const std::string& name,
13 const std::string& address,
14 bool paired,
15 bool bonded,
16 bool connected)
17 : BluetoothDevice(adapter),
18 name_(UTF8ToUTF16(name)),
19 address_(address) {
20 ON_CALL(*this, GetName())
21 .WillByDefault(testing::Return(name_));
22 ON_CALL(*this, address())
23 .WillByDefault(testing::ReturnRef(address_));
24 ON_CALL(*this, IsPaired())
25 .WillByDefault(testing::Return(paired));
26 ON_CALL(*this, IsBonded())
27 .WillByDefault(testing::Return(bonded));
28 ON_CALL(*this, IsConnected())
29 .WillByDefault(testing::Return(connected));
30 }
31
32 MockBluetoothDevice::~MockBluetoothDevice() {}
33
34 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698