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

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

Issue 23658053: Track active references in ShillClientHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 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
« no previous file with comments | « chromeos/dbus/shill_manager_client.cc ('k') | chromeos/dbus/shill_service_client.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 4
5 #include "chromeos/dbus/shill_profile_client.h" 5 #include "chromeos/dbus/shill_profile_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 ShillClientHelper* ShillProfileClientImpl::GetHelper( 80 ShillClientHelper* ShillProfileClientImpl::GetHelper(
81 const dbus::ObjectPath& profile_path) { 81 const dbus::ObjectPath& profile_path) {
82 HelperMap::iterator it = helpers_.find(profile_path.value()); 82 HelperMap::iterator it = helpers_.find(profile_path.value());
83 if (it != helpers_.end()) 83 if (it != helpers_.end())
84 return it->second; 84 return it->second;
85 85
86 // There is no helper for the profile, create it. 86 // There is no helper for the profile, create it.
87 dbus::ObjectProxy* object_proxy = 87 dbus::ObjectProxy* object_proxy =
88 bus_->GetObjectProxy(flimflam::kFlimflamServiceName, profile_path); 88 bus_->GetObjectProxy(flimflam::kFlimflamServiceName, profile_path);
89 ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy); 89 ShillClientHelper* helper = new ShillClientHelper(object_proxy);
90 helper->MonitorPropertyChanged(flimflam::kFlimflamProfileInterface); 90 helper->MonitorPropertyChanged(flimflam::kFlimflamProfileInterface);
91 helpers_.insert(HelperMap::value_type(profile_path.value(), helper)); 91 helpers_.insert(HelperMap::value_type(profile_path.value(), helper));
92 return helper; 92 return helper;
93 } 93 }
94 94
95 void ShillProfileClientImpl::GetProperties( 95 void ShillProfileClientImpl::GetProperties(
96 const dbus::ObjectPath& profile_path, 96 const dbus::ObjectPath& profile_path,
97 const DictionaryValueCallbackWithoutStatus& callback, 97 const DictionaryValueCallbackWithoutStatus& callback,
98 const ErrorCallback& error_callback) { 98 const ErrorCallback& error_callback) {
99 dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface, 99 dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // static 137 // static
138 ShillProfileClient* ShillProfileClient::Create( 138 ShillProfileClient* ShillProfileClient::Create(
139 DBusClientImplementationType type) { 139 DBusClientImplementationType type) {
140 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 140 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
141 return new ShillProfileClientImpl(); 141 return new ShillProfileClientImpl();
142 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 142 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
143 return new ShillProfileClientStub(); 143 return new ShillProfileClientStub();
144 } 144 }
145 145
146 } // namespace chromeos 146 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client.cc ('k') | chromeos/dbus/shill_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698