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

Side by Side Diff: chrome/browser/usb/usb_service.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « chrome/browser/usb/usb_device.cc ('k') | chrome/browser/webdata/web_data_service_factory.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 "chrome/browser/usb/usb_service.h" 5 #include "chrome/browser/usb/usb_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (!ContainsKey(devices_, device)) { 193 if (!ContainsKey(devices_, device)) {
194 libusb_device_handle* handle = NULL; 194 libusb_device_handle* handle = NULL;
195 if (libusb_open(device, &handle)) { 195 if (libusb_open(device, &handle)) {
196 LOG(WARNING) << "Could not open device."; 196 LOG(WARNING) << "Could not open device.";
197 return NULL; 197 return NULL;
198 } 198 }
199 199
200 UsbDevice* wrapper = new UsbDevice(this, handle); 200 UsbDevice* wrapper = new UsbDevice(this, handle);
201 devices_[device] = wrapper; 201 devices_[device] = wrapper;
202 } 202 }
203 return devices_[device]; 203 return devices_[device].get();
204 } 204 }
OLDNEW
« no previous file with comments | « chrome/browser/usb/usb_device.cc ('k') | chrome/browser/webdata/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698