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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/operation_manager_unittest.cc

Issue 2257113002: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/image_writer_private/operation_manager.h " 5 #include "chrome/browser/extensions/api/image_writer_private/operation_manager.h "
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 25 matching lines...) Expand all
36 void DispatchEventToExtension( 36 void DispatchEventToExtension(
37 const std::string& extension_id, 37 const std::string& extension_id,
38 std::unique_ptr<extensions::Event> event) override { 38 std::unique_ptr<extensions::Event> event) override {
39 // Do nothing with the event as no tests currently care. 39 // Do nothing with the event as no tests currently care.
40 } 40 }
41 }; 41 };
42 42
43 // FakeEventRouter factory function 43 // FakeEventRouter factory function
44 std::unique_ptr<KeyedService> FakeEventRouterFactoryFunction( 44 std::unique_ptr<KeyedService> FakeEventRouterFactoryFunction(
45 content::BrowserContext* context) { 45 content::BrowserContext* context) {
46 return base::WrapUnique(new FakeEventRouter(static_cast<Profile*>(context))); 46 return base::MakeUnique<FakeEventRouter>(static_cast<Profile*>(context));
47 } 47 }
48 48
49 namespace { 49 namespace {
50 50
51 class ImageWriterOperationManagerTest : public ImageWriterUnitTestBase { 51 class ImageWriterOperationManagerTest : public ImageWriterUnitTestBase {
52 public: 52 public:
53 void StartCallback(bool success, const std::string& error) { 53 void StartCallback(bool success, const std::string& error) {
54 started_ = true; 54 started_ = true;
55 start_success_ = success; 55 start_success_ = success;
56 start_error_ = error; 56 start_error_ = error;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 EXPECT_TRUE(cancelled_); 140 EXPECT_TRUE(cancelled_);
141 EXPECT_TRUE(cancel_success_); 141 EXPECT_TRUE(cancel_success_);
142 EXPECT_EQ("", cancel_error_); 142 EXPECT_EQ("", cancel_error_);
143 143
144 base::RunLoop().RunUntilIdle(); 144 base::RunLoop().RunUntilIdle();
145 } 145 }
146 146
147 } // namespace 147 } // namespace
148 } // namespace image_writer 148 } // namespace image_writer
149 } // namespace extensions 149 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698