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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc

Issue 16296002: 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: 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
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/printing/cloud_print/cloud_print_proxy_service.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
6 6
7 #include <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 for (size_t i = 0; i < list->GetSize(); ++i) { 147 for (size_t i = 0; i < list->GetSize(); ++i) {
148 std::string printer; 148 std::string printer;
149 if (list->GetString(i, &printer)) 149 if (list->GetString(i, &printer))
150 printers->push_back(printer); 150 printers->push_back(printer);
151 } 151 }
152 } 152 }
153 } else { 153 } else {
154 printing::PrinterList printer_list; 154 printing::PrinterList printer_list;
155 scoped_refptr<printing::PrintBackend> backend( 155 scoped_refptr<printing::PrintBackend> backend(
156 printing::PrintBackend::CreateInstance(NULL)); 156 printing::PrintBackend::CreateInstance(NULL));
157 if (backend) 157 if (backend.get())
158 backend->EnumeratePrinters(&printer_list); 158 backend->EnumeratePrinters(&printer_list);
159 for (size_t i = 0; i < printer_list.size(); ++i) 159 for (size_t i = 0; i < printer_list.size(); ++i)
160 printers->push_back(printer_list[i].printer_name); 160 printers->push_back(printer_list[i].printer_name);
161 } 161 }
162 } 162 }
163 163
164 void CloudPrintProxyService::RefreshCloudPrintProxyStatus() { 164 void CloudPrintProxyService::RefreshCloudPrintProxyStatus() {
165 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 165 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
166 ServiceProcessControl* process_control = GetServiceProcessControl(); 166 ServiceProcessControl* process_control = GetServiceProcessControl();
167 DCHECK(process_control->IsConnected()); 167 DCHECK(process_control->IsConnected());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { 215 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) {
216 GetServiceProcessControl()->Launch(task, base::Closure()); 216 GetServiceProcessControl()->Launch(task, base::Closure());
217 return true; 217 return true;
218 } 218 }
219 219
220 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() { 220 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() {
221 return ServiceProcessControl::GetInstance(); 221 return ServiceProcessControl::GetInstance();
222 } 222 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698