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

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

Issue 342003005: Show alert failure for reloading unpacked extensions with bad manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prettified failure path Created 6 years, 5 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_UNPACKED_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Allows overriding of whether modern manifest versions are required; 58 // Allows overriding of whether modern manifest versions are required;
59 // intended for testing. 59 // intended for testing.
60 bool require_modern_manifest_version() const { 60 bool require_modern_manifest_version() const {
61 return require_modern_manifest_version_; 61 return require_modern_manifest_version_;
62 } 62 }
63 void set_require_modern_manifest_version(bool val) { 63 void set_require_modern_manifest_version(bool val) {
64 require_modern_manifest_version_ = val; 64 require_modern_manifest_version_ = val;
65 } 65 }
66 66
67 void set_on_failure_callback(const OnFailureCallback& callback) {
68 on_failure_callback_ = callback;
69 }
70
71 void set_be_noisy_on_failure(bool be_noisy_on_failure) { 67 void set_be_noisy_on_failure(bool be_noisy_on_failure) {
72 be_noisy_on_failure_ = be_noisy_on_failure; 68 be_noisy_on_failure_ = be_noisy_on_failure;
73 } 69 }
74 70
75 private: 71 private:
76 friend class base::RefCountedThreadSafe<UnpackedInstaller>; 72 friend class base::RefCountedThreadSafe<UnpackedInstaller>;
77 73
78 explicit UnpackedInstaller(ExtensionService* extension_service); 74 explicit UnpackedInstaller(ExtensionService* extension_service);
79 virtual ~UnpackedInstaller(); 75 virtual ~UnpackedInstaller();
80 76
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 base::FilePath extension_path_; 119 base::FilePath extension_path_;
124 120
125 // If true and the extension contains plugins, we prompt the user before 121 // If true and the extension contains plugins, we prompt the user before
126 // loading. 122 // loading.
127 bool prompt_for_plugins_; 123 bool prompt_for_plugins_;
128 124
129 // Whether to require the extension installed to have a modern manifest 125 // Whether to require the extension installed to have a modern manifest
130 // version. 126 // version.
131 bool require_modern_manifest_version_; 127 bool require_modern_manifest_version_;
132 128
133 // An optional callback to set in order to be notified of failure.
134 OnFailureCallback on_failure_callback_;
135
136 // Whether or not to be noisy (show a dialog) on failure. Defaults to true. 129 // Whether or not to be noisy (show a dialog) on failure. Defaults to true.
137 bool be_noisy_on_failure_; 130 bool be_noisy_on_failure_;
138 131
139 // Checks management policies and requirements before the extension can be 132 // Checks management policies and requirements before the extension can be
140 // installed. 133 // installed.
141 ExtensionInstallChecker install_checker_; 134 ExtensionInstallChecker install_checker_;
142 135
143 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); 136 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller);
144 }; 137 };
145 138
146 } // namespace extensions 139 } // namespace extensions
147 140
148 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ 141 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698