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

Side by Side Diff: chrome/browser/extensions/test_extension_system.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "extensions/browser/extension_system.h" 10 #include "extensions/browser/extension_system.h"
10 #include "extensions/common/one_shot_event.h" 11 #include "extensions/common/one_shot_event.h"
11 12
12 class Profile; 13 class Profile;
13 class TestingValueStore; 14 class TestingValueStore;
14 15
15 namespace base { 16 namespace base {
16 class CommandLine; 17 class CommandLine;
17 class FilePath; 18 class FilePath;
18 } 19 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 SharedUserScriptMaster* shared_user_script_master() override; 53 SharedUserScriptMaster* shared_user_script_master() override;
53 StateStore* state_store() override; 54 StateStore* state_store() override;
54 StateStore* rules_store() override; 55 StateStore* rules_store() override;
55 scoped_refptr<ValueStoreFactory> store_factory() override; 56 scoped_refptr<ValueStoreFactory> store_factory() override;
56 TestingValueStore* value_store(); 57 TestingValueStore* value_store();
57 InfoMap* info_map() override; 58 InfoMap* info_map() override;
58 QuotaService* quota_service() override; 59 QuotaService* quota_service() override;
59 AppSorting* app_sorting() override; 60 AppSorting* app_sorting() override;
60 const OneShotEvent& ready() const override; 61 const OneShotEvent& ready() const override;
61 ContentVerifier* content_verifier() override; 62 ContentVerifier* content_verifier() override;
62 scoped_ptr<ExtensionSet> GetDependentExtensions( 63 std::unique_ptr<ExtensionSet> GetDependentExtensions(
63 const Extension* extension) override; 64 const Extension* extension) override;
64 void InstallUpdate(const std::string& extension_id, 65 void InstallUpdate(const std::string& extension_id,
65 const base::FilePath& temp_dir) override; 66 const base::FilePath& temp_dir) override;
66 67
67 // Note that you probably want to use base::RunLoop().RunUntilIdle() right 68 // Note that you probably want to use base::RunLoop().RunUntilIdle() right
68 // after this to run all the accumulated tasks. 69 // after this to run all the accumulated tasks.
69 void SetReady() { ready_.Signal(); } 70 void SetReady() { ready_.Signal(); }
70 71
71 // Factory method for tests to use with SetTestingProfile. 72 // Factory method for tests to use with SetTestingProfile.
72 static scoped_ptr<KeyedService> Build(content::BrowserContext* profile); 73 static std::unique_ptr<KeyedService> Build(content::BrowserContext* profile);
73 74
74 // Used by ExtensionPrefsTest to re-create the AppSorting after it has 75 // Used by ExtensionPrefsTest to re-create the AppSorting after it has
75 // re-created the ExtensionPrefs instance (this can never happen in non-test 76 // re-created the ExtensionPrefs instance (this can never happen in non-test
76 // code). 77 // code).
77 void RecreateAppSorting(); 78 void RecreateAppSorting();
78 79
79 protected: 80 protected:
80 Profile* profile_; 81 Profile* profile_;
81 82
82 private: 83 private:
83 scoped_ptr<StateStore> state_store_; 84 std::unique_ptr<StateStore> state_store_;
84 scoped_refptr<TestValueStoreFactory> store_factory_; 85 scoped_refptr<TestValueStoreFactory> store_factory_;
85 scoped_ptr<ManagementPolicy> management_policy_; 86 std::unique_ptr<ManagementPolicy> management_policy_;
86 scoped_ptr<RuntimeData> runtime_data_; 87 std::unique_ptr<RuntimeData> runtime_data_;
87 scoped_ptr<ExtensionService> extension_service_; 88 std::unique_ptr<ExtensionService> extension_service_;
88 scoped_refptr<InfoMap> info_map_; 89 scoped_refptr<InfoMap> info_map_;
89 scoped_ptr<QuotaService> quota_service_; 90 std::unique_ptr<QuotaService> quota_service_;
90 scoped_ptr<AppSorting> app_sorting_; 91 std::unique_ptr<AppSorting> app_sorting_;
91 OneShotEvent ready_; 92 OneShotEvent ready_;
92 }; 93 };
93 94
94 } // namespace extensions 95 } // namespace extensions
95 96
96 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 97 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698