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

Side by Side Diff: chrome/browser/extensions/update_install_gate_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 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/extensions/update_install_gate.h" 5 #include "chrome/browser/extensions/update_install_gate.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 namespace extensions { 36 namespace extensions {
37 37
38 namespace { 38 namespace {
39 39
40 const char kAppId[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 40 const char kAppId[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
41 const char kPersistentExtensionId[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; 41 const char kPersistentExtensionId[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
42 const char kNonPersistentExtensionId[] = "cccccccccccccccccccccccccccccccc"; 42 const char kNonPersistentExtensionId[] = "cccccccccccccccccccccccccccccccc";
43 43
44 std::unique_ptr<KeyedService> BuildEventRouter( 44 std::unique_ptr<KeyedService> BuildEventRouter(
45 content::BrowserContext* profile) { 45 content::BrowserContext* profile) {
46 return base::WrapUnique(new extensions::EventRouter(profile, nullptr)); 46 return base::MakeUnique<extensions::EventRouter>(profile, nullptr);
47 } 47 }
48 48
49 scoped_refptr<Extension> CreateApp(const std::string& extension_id, 49 scoped_refptr<Extension> CreateApp(const std::string& extension_id,
50 const std::string& version) { 50 const std::string& version) {
51 scoped_refptr<Extension> app = 51 scoped_refptr<Extension> app =
52 ExtensionBuilder() 52 ExtensionBuilder()
53 .SetManifest( 53 .SetManifest(
54 DictionaryBuilder() 54 DictionaryBuilder()
55 .Set("name", "Test app") 55 .Set("name", "Test app")
56 .Set("version", version) 56 .Set("version", version)
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 Check(new_app(), kInUse, has_listener, kDontInstallImmediately, 270 Check(new_app(), kInUse, has_listener, kDontInstallImmediately,
271 InstallGate::DELAY); 271 InstallGate::DELAY);
272 Check(new_persistent(), kInUse, has_listener, kDontInstallImmediately, 272 Check(new_persistent(), kInUse, has_listener, kDontInstallImmediately,
273 has_listener ? InstallGate::DELAY : InstallGate::INSTALL); 273 has_listener ? InstallGate::DELAY : InstallGate::INSTALL);
274 Check(new_none_persistent(), kInUse, has_listener, kDontInstallImmediately, 274 Check(new_none_persistent(), kInUse, has_listener, kDontInstallImmediately,
275 InstallGate::DELAY); 275 InstallGate::DELAY);
276 } 276 }
277 } 277 }
278 278
279 } // namespace extensions 279 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/permissions_updater_unittest.cc ('k') | chrome/browser/extensions/webstore_install_with_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698