OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |