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

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

Issue 91413002: Remove fake client creation from DBusClients' Create() functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/nfc_record_client.h ('k') | chromeos/dbus/nfc_tag_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/nfc_record_client.h" 5 #include "chromeos/dbus/nfc_record_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "chromeos/dbus/fake_nfc_record_client.h"
11 #include "chromeos/dbus/nfc_device_client.h" 10 #include "chromeos/dbus/nfc_device_client.h"
12 #include "chromeos/dbus/nfc_tag_client.h" 11 #include "chromeos/dbus/nfc_tag_client.h"
13 #include "dbus/bus.h" 12 #include "dbus/bus.h"
14 #include "third_party/cros_system_api/dbus/service_constants.h" 13 #include "third_party/cros_system_api/dbus/service_constants.h"
15 14
16 using chromeos::nfc_client_helpers::DBusObjectMap; 15 using chromeos::nfc_client_helpers::DBusObjectMap;
17 using chromeos::nfc_client_helpers::ObjectProxyTree; 16 using chromeos::nfc_client_helpers::ObjectProxyTree;
18 17
19 namespace chromeos { 18 namespace chromeos {
20 19
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 239
241 DISALLOW_COPY_AND_ASSIGN(NfcRecordClientImpl); 240 DISALLOW_COPY_AND_ASSIGN(NfcRecordClientImpl);
242 }; 241 };
243 242
244 NfcRecordClient::NfcRecordClient() { 243 NfcRecordClient::NfcRecordClient() {
245 } 244 }
246 245
247 NfcRecordClient::~NfcRecordClient() { 246 NfcRecordClient::~NfcRecordClient() {
248 } 247 }
249 248
250 NfcRecordClient* NfcRecordClient::Create(DBusClientImplementationType type, 249 NfcRecordClient* NfcRecordClient::Create(NfcDeviceClient* device_client,
251 NfcDeviceClient* device_client,
252 NfcTagClient* tag_client) { 250 NfcTagClient* tag_client) {
253 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 251 return new NfcRecordClientImpl(device_client, tag_client);
254 return new NfcRecordClientImpl(device_client, tag_client);
255 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
256 return new FakeNfcRecordClient();
257 } 252 }
258 253
259 } // namespace chromeos 254 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/nfc_record_client.h ('k') | chromeos/dbus/nfc_tag_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698