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

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

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/cros_disks_client.cc ('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 4
5 #include "chromeos/dbus/dbus_thread_manager.h" 5 #include "chromeos/dbus/dbus_thread_manager.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // DBusThreadManager override. 174 // DBusThreadManager override.
175 virtual void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE { 175 virtual void RemoveObserver(DBusThreadManagerObserver* observer) OVERRIDE {
176 DCHECK(observer); 176 DCHECK(observer);
177 observers_.RemoveObserver(observer); 177 observers_.RemoveObserver(observer);
178 } 178 }
179 179
180 // DBusThreadManager override. 180 // DBusThreadManager override.
181 virtual void InitIBusBus( 181 virtual void InitIBusBus(
182 const std::string &ibus_address, 182 const std::string &ibus_address,
183 const base::Closure& on_disconnected_callback) OVERRIDE { 183 const base::Closure& on_disconnected_callback) OVERRIDE {
184 DCHECK(!ibus_bus_); 184 DCHECK(!ibus_bus_.get());
185 dbus::Bus::Options ibus_bus_options; 185 dbus::Bus::Options ibus_bus_options;
186 ibus_bus_options.bus_type = dbus::Bus::CUSTOM_ADDRESS; 186 ibus_bus_options.bus_type = dbus::Bus::CUSTOM_ADDRESS;
187 ibus_bus_options.address = ibus_address; 187 ibus_bus_options.address = ibus_address;
188 ibus_bus_options.connection_type = dbus::Bus::PRIVATE; 188 ibus_bus_options.connection_type = dbus::Bus::PRIVATE;
189 ibus_bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); 189 ibus_bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy();
190 ibus_bus_options.disconnected_callback = on_disconnected_callback; 190 ibus_bus_options.disconnected_callback = on_disconnected_callback;
191 ibus_bus_ = new dbus::Bus(ibus_bus_options); 191 ibus_bus_ = new dbus::Bus(ibus_bus_options);
192 ibus_address_ = ibus_address; 192 ibus_address_ = ibus_address;
193 VLOG(1) << "Connected to ibus-daemon: " << ibus_address; 193 VLOG(1) << "Connected to ibus-daemon: " << ibus_address;
194 194
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 496 }
497 497
498 // static 498 // static
499 DBusThreadManager* DBusThreadManager::Get() { 499 DBusThreadManager* DBusThreadManager::Get() {
500 CHECK(g_dbus_thread_manager) 500 CHECK(g_dbus_thread_manager)
501 << "DBusThreadManager::Get() called before Initialize()"; 501 << "DBusThreadManager::Get() called before Initialize()";
502 return g_dbus_thread_manager; 502 return g_dbus_thread_manager;
503 } 503 }
504 504
505 } // namespace chromeos 505 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/cros_disks_client.cc ('k') | chromeos/dbus/gsm_sms_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698