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

Side by Side Diff: chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/print_preview/printer_backend_proxy.h" 5 #include "chrome/browser/ui/webui/print_preview/printer_backend_proxy.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 } 60 }
61 61
62 void FetchCapabilities(std::unique_ptr<chromeos::Printer> printer, 62 void FetchCapabilities(std::unique_ptr<chromeos::Printer> printer,
63 const PrinterSetupCallback& cb) { 63 const PrinterSetupCallback& cb) {
64 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 64 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
65 65
66 PrinterBasicInfo basic_info = ToBasicInfo(*printer); 66 PrinterBasicInfo basic_info = ToBasicInfo(*printer);
67 67
68 base::PostTaskWithTraitsAndReplyWithResult( 68 base::PostTaskWithTraitsAndReplyWithResult(
69 FROM_HERE, 69 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
70 base::TaskTraits().MayBlock().WithPriority(
71 base::TaskPriority::BACKGROUND),
72 base::Bind(&GetSettingsOnBlockingPool, printer->id(), basic_info), cb); 70 base::Bind(&GetSettingsOnBlockingPool, printer->id(), basic_info), cb);
73 } 71 }
74 72
75 void HandlePrinterSetup(std::unique_ptr<chromeos::Printer> printer, 73 void HandlePrinterSetup(std::unique_ptr<chromeos::Printer> printer,
76 const PrinterSetupCallback& cb, 74 const PrinterSetupCallback& cb,
77 chromeos::PrinterSetupResult result) { 75 chromeos::PrinterSetupResult result) {
78 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 76 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
79 77
80 switch (result) { 78 switch (result) {
81 case chromeos::PrinterSetupResult::SUCCESS: 79 case chromeos::PrinterSetupResult::SUCCESS:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 }; 173 };
176 174
177 } // namespace 175 } // namespace
178 176
179 std::unique_ptr<PrinterBackendProxy> PrinterBackendProxy::Create( 177 std::unique_ptr<PrinterBackendProxy> PrinterBackendProxy::Create(
180 Profile* profile) { 178 Profile* profile) {
181 return base::MakeUnique<PrinterBackendProxyChromeos>(profile); 179 return base::MakeUnique<PrinterBackendProxyChromeos>(profile);
182 } 180 }
183 181
184 } // namespace printing 182 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_handler.cc ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698