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

Side by Side Diff: chrome/service/cloud_print/cloud_print_proxy.cc

Issue 511473002: Remove implicit conversions from scoped_refptr to T* in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move download out Created 6 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
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/service/cloud_print/cloud_print_proxy.h" 5 #include "chrome/service/cloud_print/cloud_print_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 ConnectorSettings settings; 192 ConnectorSettings settings;
193 settings.InitFrom(service_prefs_); 193 settings.InitFrom(service_prefs_);
194 info->proxy_id = settings.proxy_id(); 194 info->proxy_id = settings.proxy_id();
195 } 195 }
196 196
197 void CloudPrintProxy::GetPrinters(std::vector<std::string>* printers) { 197 void CloudPrintProxy::GetPrinters(std::vector<std::string>* printers) {
198 ConnectorSettings settings; 198 ConnectorSettings settings;
199 settings.InitFrom(service_prefs_); 199 settings.InitFrom(service_prefs_);
200 scoped_refptr<PrintSystem> print_system = 200 scoped_refptr<PrintSystem> print_system =
201 PrintSystem::CreateInstance(settings.print_system_settings()); 201 PrintSystem::CreateInstance(settings.print_system_settings());
202 if (!print_system) 202 if (!print_system.get())
203 return; 203 return;
204 PrintSystem::PrintSystemResult result = print_system->Init(); 204 PrintSystem::PrintSystemResult result = print_system->Init();
205 if (!result.succeeded()) 205 if (!result.succeeded())
206 return; 206 return;
207 printing::PrinterList printer_list; 207 printing::PrinterList printer_list;
208 print_system->EnumeratePrinters(&printer_list); 208 print_system->EnumeratePrinters(&printer_list);
209 for (size_t i = 0; i < printer_list.size(); ++i) 209 for (size_t i = 0; i < printer_list.size(); ++i)
210 printers->push_back(printer_list[i].printer_name); 210 printers->push_back(printer_list[i].printer_name);
211 } 211 }
212 212
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 287
288 void CloudPrintProxy::ShutdownBackend() { 288 void CloudPrintProxy::ShutdownBackend() {
289 DCHECK(CalledOnValidThread()); 289 DCHECK(CalledOnValidThread());
290 if (backend_.get()) 290 if (backend_.get())
291 backend_->Shutdown(); 291 backend_->Shutdown();
292 backend_.reset(); 292 backend_.reset();
293 } 293 }
294 294
295 } // namespace cloud_print 295 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/common/net/x509_certificate_model_unittest.cc ('k') | chrome/test/remoting/remote_desktop_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698