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

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

Issue 2206693002: Improve settings override bubble to indicate policy installed extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 1 month 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 enum InstallState { 45 enum InstallState {
46 INSTALL_FAILED, 46 INSTALL_FAILED,
47 INSTALL_UPDATED, 47 INSTALL_UPDATED,
48 INSTALL_NEW, 48 INSTALL_NEW,
49 INSTALL_WITHOUT_LOAD, 49 INSTALL_WITHOUT_LOAD,
50 }; 50 };
51 51
52 const Extension* PackAndInstallCRX(const base::FilePath& dir_path, 52 const Extension* PackAndInstallCRX(const base::FilePath& dir_path,
53 const base::FilePath& pem_path, 53 const base::FilePath& pem_path,
54 InstallState install_state, 54 InstallState install_state,
55 int creation_flags); 55 int creation_flags,
56 Manifest::Location install_location);
56 const Extension* PackAndInstallCRX(const base::FilePath& dir_path, 57 const Extension* PackAndInstallCRX(const base::FilePath& dir_path,
57 const base::FilePath& pem_path, 58 const base::FilePath& pem_path,
58 InstallState install_state); 59 InstallState install_state);
59 const Extension* PackAndInstallCRX(const base::FilePath& dir_path, 60 const Extension* PackAndInstallCRX(const base::FilePath& dir_path,
60 InstallState install_state); 61 InstallState install_state);
61 62 const Extension* PackAndInstallCRX(const base::FilePath& dir_path,
63 Manifest::Location install_location,
64 InstallState install_state);
62 const Extension* InstallCRX(const base::FilePath& path, 65 const Extension* InstallCRX(const base::FilePath& path,
63 InstallState install_state, 66 InstallState install_state,
64 int creation_flags, 67 int creation_flags,
65 const std::string& expected_old_name); 68 const std::string& expected_old_name);
66 const Extension* InstallCRX(const base::FilePath& path, 69 const Extension* InstallCRX(const base::FilePath& path,
70 Manifest::Location install_location,
71 InstallState install_state,
72 int creation_flags);
73 const Extension* InstallCRX(const base::FilePath& path,
67 InstallState install_state, 74 InstallState install_state,
68 int creation_flags); 75 int creation_flags);
69 const Extension* InstallCRX(const base::FilePath& path, 76 const Extension* InstallCRX(const base::FilePath& path,
70 InstallState install_state); 77 InstallState install_state);
71 const Extension* InstallCRXFromWebStore(const base::FilePath& path, 78 const Extension* InstallCRXFromWebStore(const base::FilePath& path,
72 InstallState install_state); 79 InstallState install_state);
73 const Extension* InstallCRXWithLocation(const base::FilePath& crx_path,
74 Manifest::Location install_location,
75 InstallState install_state);
76 80
77 // Verifies the result of a CRX installation. Used by InstallCRX. Set the 81 // Verifies the result of a CRX installation. Used by InstallCRX. Set the
78 // |install_state| to INSTALL_FAILED if the installation is expected to fail. 82 // |install_state| to INSTALL_FAILED if the installation is expected to fail.
79 // Returns an Extension pointer if the install succeeded, null otherwise. 83 // Returns an Extension pointer if the install succeeded, null otherwise.
80 const Extension* VerifyCrxInstall(const base::FilePath& path, 84 const Extension* VerifyCrxInstall(const base::FilePath& path,
81 InstallState install_state); 85 InstallState install_state);
82 86
83 // Verifies the result of a CRX installation. Used by InstallCRX. Set the 87 // Verifies the result of a CRX installation. Used by InstallCRX. Set the
84 // |install_state| to INSTALL_FAILED if the installation is expected to fail. 88 // |install_state| to INSTALL_FAILED if the installation is expected to fail.
85 // If |install_state| is INSTALL_UPDATED, and |expected_old_name| is 89 // If |install_state| is INSTALL_UPDATED, and |expected_old_name| is
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 132
129 // TODO(treib,devlin): Make these private and add accessors as needed. 133 // TODO(treib,devlin): Make these private and add accessors as needed.
130 extensions::ExtensionList loaded_; 134 extensions::ExtensionList loaded_;
131 const Extension* installed_; 135 const Extension* installed_;
132 bool was_update_; 136 bool was_update_;
133 std::string old_name_; 137 std::string old_name_;
134 std::string unloaded_id_; 138 std::string unloaded_id_;
135 UnloadedExtensionInfo::Reason unloaded_reason_; 139 UnloadedExtensionInfo::Reason unloaded_reason_;
136 140
137 private: 141 private:
138 void InstallCRXInternal(const base::FilePath& crx_path, int creation_flags); 142 void InstallCRXInternal(const base::FilePath& crx_path,
143 Manifest::Location install_location,
144 InstallState install_state,
145 int creation_flags);
139 146
140 size_t expected_extensions_count_; 147 size_t expected_extensions_count_;
141 148
142 FeatureSwitch::ScopedOverride override_external_install_prompt_; 149 FeatureSwitch::ScopedOverride override_external_install_prompt_;
143 150
144 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 151 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
145 registry_observer_; 152 registry_observer_;
146 153
147 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestWithInstall); 154 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestWithInstall);
148 }; 155 };
149 156
150 } // namespace extensions 157 } // namespace extensions
151 158
152 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ 159 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698