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

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

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extension_printer_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/extension_printer_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 pending_capability_callbacks_; 442 pending_capability_callbacks_;
443 std::queue<PrintRequestInfo> pending_print_requests_; 443 std::queue<PrintRequestInfo> pending_print_requests_;
444 std::queue<PrinterProviderAPI::GetPrinterInfoCallback> 444 std::queue<PrinterProviderAPI::GetPrinterInfoCallback>
445 pending_usb_info_callbacks_; 445 pending_usb_info_callbacks_;
446 446
447 DISALLOW_COPY_AND_ASSIGN(FakePrinterProviderAPI); 447 DISALLOW_COPY_AND_ASSIGN(FakePrinterProviderAPI);
448 }; 448 };
449 449
450 std::unique_ptr<KeyedService> BuildTestingPrinterProviderAPI( 450 std::unique_ptr<KeyedService> BuildTestingPrinterProviderAPI(
451 content::BrowserContext* context) { 451 content::BrowserContext* context) {
452 return base::WrapUnique(new FakePrinterProviderAPI()); 452 return base::MakeUnique<FakePrinterProviderAPI>();
453 } 453 }
454 454
455 } // namespace 455 } // namespace
456 456
457 class ExtensionPrinterHandlerTest : public testing::Test { 457 class ExtensionPrinterHandlerTest : public testing::Test {
458 public: 458 public:
459 ExtensionPrinterHandlerTest() : pwg_raster_converter_(NULL) {} 459 ExtensionPrinterHandlerTest() : pwg_raster_converter_(NULL) {}
460 ~ExtensionPrinterHandlerTest() override = default; 460 ~ExtensionPrinterHandlerTest() override = default;
461 461
462 void SetUp() override { 462 void SetUp() override {
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 DictionaryBuilder() 1007 DictionaryBuilder()
1008 .Set("id", "printer1") 1008 .Set("id", "printer1")
1009 .Set("name", "Printer 1") 1009 .Set("name", "Printer 1")
1010 .Build()); 1010 .Build());
1011 1011
1012 fake_api->TriggerNextUsbPrinterInfoCallback(*original_printer_info); 1012 fake_api->TriggerNextUsbPrinterInfoCallback(*original_printer_info);
1013 1013
1014 EXPECT_EQ(0u, call_count); 1014 EXPECT_EQ(0u, call_count);
1015 EXPECT_FALSE(printer_info.get()); 1015 EXPECT_FALSE(printer_info.get());
1016 } 1016 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/policy_ui_handler.cc ('k') | chrome/browser/ui/webui/settings/certificates_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698