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

Unified Diff: chrome/browser/chromeos/dbus/flimflam_network_client.cc

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/dbus/flimflam_network_client.cc
diff --git a/chrome/browser/chromeos/dbus/flimflam_network_client.cc b/chrome/browser/chromeos/dbus/flimflam_network_client.cc
deleted file mode 100644
index 9cc873463f88a5796503809cd4a929b27ec69e18..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/dbus/flimflam_network_client.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/dbus/flimflam_network_client.h"
-
-#include "base/bind.h"
-#include "dbus/bus.h"
-#include "dbus/message.h"
-#include "dbus/object_path.h"
-#include "dbus/object_proxy.h"
-#include "dbus/values_util.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-namespace chromeos {
-
-namespace {
-
-// The FlimflamNetworkClient implementation.
-class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
- public:
- explicit FlimflamNetworkClientImpl(dbus::Bus* bus)
- : proxy_(bus->GetObjectProxy(
- flimflam::kFlimflamServiceName,
- dbus::ObjectPath(flimflam::kFlimflamServicePath))),
- helper_(proxy_) {
- helper_.MonitorPropertyChanged(flimflam::kFlimflamNetworkInterface);
- }
-
- // FlimflamNetworkClient override.
- virtual void SetPropertyChangedHandler(
- const PropertyChangedHandler& handler) OVERRIDE {
- helper_.SetPropertyChangedHandler(handler);
- }
-
- // FlimflamNetworkClient override.
- virtual void ResetPropertyChangedHandler() OVERRIDE {
- helper_.ResetPropertyChangedHandler();
- }
-
- // FlimflamNetworkClient override.
- virtual void GetProperties(const DictionaryValueCallback& callback) OVERRIDE {
- dbus::MethodCall method_call(flimflam::kFlimflamNetworkInterface,
- flimflam::kGetPropertiesFunction);
- helper_.CallDictionaryValueMethod(&method_call, callback);
- }
-
- private:
- dbus::ObjectProxy* proxy_;
- FlimflamClientHelper helper_;
-
- DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientImpl);
-};
-
-// A stub implementation of FlimflamNetworkClient.
-class FlimflamNetworkClientStubImpl : public FlimflamNetworkClient {
- public:
- FlimflamNetworkClientStubImpl() {}
-
- virtual ~FlimflamNetworkClientStubImpl() {}
-
- // FlimflamNetworkClient override.
- virtual void SetPropertyChangedHandler(
- const PropertyChangedHandler& handler) OVERRIDE {}
-
- // FlimflamNetworkClient override.
- virtual void ResetPropertyChangedHandler() OVERRIDE {}
-
- // FlimflamNetworkClient override.
- virtual void GetProperties(const DictionaryValueCallback& callback) OVERRIDE {
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientStubImpl);
-};
-
-} // namespace
-
-FlimflamNetworkClient::FlimflamNetworkClient() {}
-
-FlimflamNetworkClient::~FlimflamNetworkClient() {}
-
-// static
-FlimflamNetworkClient* FlimflamNetworkClient::Create(
- DBusClientImplementationType type,
- dbus::Bus* bus) {
- if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
- return new FlimflamNetworkClientImpl(bus);
- DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
- return new FlimflamNetworkClientStubImpl();
-}
-
-} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698