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

Side by Side Diff: chromeos/dbus/gsm_sms_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/gsm_sms_client.h ('k') | chromeos/dbus/gsm_sms_client_unittest.cc » ('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 #include "chromeos/dbus/gsm_sms_client.h" 4 #include "chromeos/dbus/gsm_sms_client.h"
5 5
6 #include <map> 6 #include <map>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h"
12 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
15 #include "base/stl_util.h" 14 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
17 #include "base/values.h" 16 #include "base/values.h"
18 #include "chromeos/chromeos_switches.h"
19 #include "chromeos/dbus/fake_gsm_sms_client.h"
20 #include "dbus/bus.h" 17 #include "dbus/bus.h"
21 #include "dbus/message.h" 18 #include "dbus/message.h"
22 #include "dbus/object_proxy.h" 19 #include "dbus/object_proxy.h"
23 #include "dbus/values_util.h" 20 #include "dbus/values_util.h"
24 #include "third_party/cros_system_api/dbus/service_constants.h" 21 #include "third_party/cros_system_api/dbus/service_constants.h"
25 22
26 namespace chromeos { 23 namespace chromeos {
27 24
28 namespace { 25 namespace {
29 26
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } // namespace 237 } // namespace
241 238
242 //////////////////////////////////////////////////////////////////////////////// 239 ////////////////////////////////////////////////////////////////////////////////
243 // GsmSMSClient 240 // GsmSMSClient
244 241
245 GsmSMSClient::GsmSMSClient() {} 242 GsmSMSClient::GsmSMSClient() {}
246 243
247 GsmSMSClient::~GsmSMSClient() {} 244 GsmSMSClient::~GsmSMSClient() {}
248 245
249 // static 246 // static
250 GsmSMSClient* GsmSMSClient::Create(DBusClientImplementationType type) { 247 GsmSMSClient* GsmSMSClient::Create() {
251 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 248 return new GsmSMSClientImpl();
252 return new GsmSMSClientImpl();
253 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
254
255 FakeGsmSMSClient* fake = new FakeGsmSMSClient();
256 fake->set_sms_test_message_switch_present(
257 CommandLine::ForCurrentProcess()->HasSwitch(
258 chromeos::switches::kSmsTestMessages));
259 return fake;
260 } 249 }
261 250
262 } // namespace chromeos 251 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/gsm_sms_client.h ('k') | chromeos/dbus/gsm_sms_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698