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

Side by Side Diff: chrome/browser/chromeos/printer_detector/cups_printer_detector.cc

Issue 2906633004: Modify PrinterSetupResult enum to constant style. (Closed)
Patch Set: typo Created 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/printing/printer_configurer.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 OnPrinterResolved(std::move(data)); 244 OnPrinterResolved(std::move(data));
245 } 245 }
246 246
247 // Called with the result of asking to have a printer configured for CUPS. If 247 // Called with the result of asking to have a printer configured for CUPS. If
248 // |printer_to_register| is non-null and we successfully configured, then the 248 // |printer_to_register| is non-null and we successfully configured, then the
249 // printer is registered with the printers manager. 249 // printer is registered with the printers manager.
250 void SetUpPrinterDone(std::unique_ptr<SetUpPrinterData> data, 250 void SetUpPrinterDone(std::unique_ptr<SetUpPrinterData> data,
251 PrinterSetupResult result) { 251 PrinterSetupResult result) {
252 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 252 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
253 if (result == PrinterSetupResult::SUCCESS) { 253 if (result == PrinterSetupResult::kSuccess) {
254 if (data->is_new) { 254 if (data->is_new) {
255 // We aren't done with data->printer yet, so we have to copy it instead 255 // We aren't done with data->printer yet, so we have to copy it instead
256 // of moving it. 256 // of moving it.
257 auto printer_copy = base::MakeUnique<Printer>(*data->printer); 257 auto printer_copy = base::MakeUnique<Printer>(*data->printer);
258 PrintersManagerFactory::GetForBrowserContext(profile_)->RegisterPrinter( 258 PrintersManagerFactory::GetForBrowserContext(profile_)->RegisterPrinter(
259 std::move(printer_copy)); 259 std::move(printer_copy));
260 } 260 }
261 // TODO(justincarlson): If the device was hotplugged, pop a timed 261 // TODO(justincarlson): If the device was hotplugged, pop a timed
262 // notification that says the printer is now available for printing. 262 // notification that says the printer is now available for printing.
263 } 263 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 std::vector<Printer> PrinterDetector::GetPrinters() { 309 std::vector<Printer> PrinterDetector::GetPrinters() {
310 return std::vector<Printer>(); 310 return std::vector<Printer>();
311 } 311 }
312 312
313 // static 313 // static
314 std::unique_ptr<PrinterDetector> PrinterDetector::CreateCups(Profile* profile) { 314 std::unique_ptr<PrinterDetector> PrinterDetector::CreateCups(Profile* profile) {
315 return base::MakeUnique<CupsPrinterDetectorImpl>(profile); 315 return base::MakeUnique<CupsPrinterDetectorImpl>(profile);
316 } 316 }
317 317
318 } // namespace chromeos 318 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/printing/printer_configurer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698