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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.h

Issue 557953005: Allow the user to "repair" a corrupted extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (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_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/prefs/pref_change_registrar.h" 13 #include "base/prefs/pref_change_registrar.h"
14 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
15 #include "chrome/browser/extensions/error_console/error_console.h" 15 #include "chrome/browser/extensions/error_console/error_console.h"
16 #include "chrome/browser/extensions/extension_install_prompt.h" 16 #include "chrome/browser/extensions/extension_install_prompt.h"
17 #include "chrome/browser/extensions/extension_install_ui.h" 17 #include "chrome/browser/extensions/extension_install_ui.h"
18 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 18 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
19 #include "chrome/browser/extensions/requirements_checker.h" 19 #include "chrome/browser/extensions/requirements_checker.h"
20 #include "chrome/common/extensions/webstore_install_result.h"
20 #include "content/public/browser/navigation_controller.h" 21 #include "content/public/browser/navigation_controller.h"
21 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/web_contents_observer.h" 24 #include "content/public/browser/web_contents_observer.h"
24 #include "content/public/browser/web_ui_message_handler.h" 25 #include "content/public/browser/web_ui_message_handler.h"
25 #include "extensions/browser/extension_prefs.h" 26 #include "extensions/browser/extension_prefs.h"
26 #include "extensions/browser/extension_prefs_observer.h" 27 #include "extensions/browser/extension_prefs_observer.h"
27 #include "extensions/browser/extension_registry_observer.h" 28 #include "extensions/browser/extension_registry_observer.h"
28 #include "extensions/browser/warning_service.h" 29 #include "extensions/browser/warning_service.h"
29 #include "url/gurl.h" 30 #include "url/gurl.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 158
158 // Callback for "inspect" message. 159 // Callback for "inspect" message.
159 void HandleInspectMessage(const base::ListValue* args); 160 void HandleInspectMessage(const base::ListValue* args);
160 161
161 // Callback for "launch" message. 162 // Callback for "launch" message.
162 void HandleLaunchMessage(const base::ListValue* args); 163 void HandleLaunchMessage(const base::ListValue* args);
163 164
164 // Callback for "reload" message. 165 // Callback for "reload" message.
165 void HandleReloadMessage(const base::ListValue* args); 166 void HandleReloadMessage(const base::ListValue* args);
166 167
168 // Callback for "repair" message.
169 void HandleRepairMessage(const base::ListValue* args);
170
167 // Callback for "enable" message. 171 // Callback for "enable" message.
168 void HandleEnableMessage(const base::ListValue* args); 172 void HandleEnableMessage(const base::ListValue* args);
169 173
170 // Callback for "enableIncognito" message. 174 // Callback for "enableIncognito" message.
171 void HandleEnableIncognitoMessage(const base::ListValue* args); 175 void HandleEnableIncognitoMessage(const base::ListValue* args);
172 176
173 // Callback for "enableErrorCollection" message. 177 // Callback for "enableErrorCollection" message.
174 void HandleEnableErrorCollectionMessage(const base::ListValue* args); 178 void HandleEnableErrorCollectionMessage(const base::ListValue* args);
175 179
176 // Callback for "allowFileAcces" message. 180 // Callback for "allowFileAcces" message.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 const std::set<content::RenderViewHost*>& views, 225 const std::set<content::RenderViewHost*>& views,
222 std::vector<ExtensionPage>* result); 226 std::vector<ExtensionPage>* result);
223 void GetAppWindowPagesForExtensionProfile(const Extension* extension, 227 void GetAppWindowPagesForExtensionProfile(const Extension* extension,
224 Profile* profile, 228 Profile* profile,
225 std::vector<ExtensionPage>* result); 229 std::vector<ExtensionPage>* result);
226 230
227 // Returns the ExtensionUninstallDialog object for this class, creating it if 231 // Returns the ExtensionUninstallDialog object for this class, creating it if
228 // needed. 232 // needed.
229 ExtensionUninstallDialog* GetExtensionUninstallDialog(); 233 ExtensionUninstallDialog* GetExtensionUninstallDialog();
230 234
235 // Called when the reinstallation is complete.
236 void OnReinstallComplete(bool success,
237 const std::string& error,
238 webstore_install::Result result);
239
231 // Callback for RequirementsChecker. 240 // Callback for RequirementsChecker.
232 void OnRequirementsChecked(std::string extension_id, 241 void OnRequirementsChecked(std::string extension_id,
233 std::vector<std::string> requirement_errors); 242 std::vector<std::string> requirement_errors);
234 243
235 // Handles the load retry notification sent from 244 // Handles the load retry notification sent from
236 // ExtensionService::ReportExtensionLoadError. Attempts to retry loading 245 // ExtensionService::ReportExtensionLoadError. Attempts to retry loading
237 // extension from |path| if retry is true, otherwise removes |path| from the 246 // extension from |path| if retry is true, otherwise removes |path| from the
238 // vector of currently loading extensions. 247 // vector of currently loading extensions.
239 // 248 //
240 // Does nothing if |path| is not a currently loading extension this object is 249 // Does nothing if |path| is not a currently loading extension this object is
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // Whether we found any DISABLE_NOT_VERIFIED extensions and want to kick off 312 // Whether we found any DISABLE_NOT_VERIFIED extensions and want to kick off
304 // a verification check to try and rescue them. 313 // a verification check to try and rescue them.
305 bool should_do_verification_check_; 314 bool should_do_verification_check_;
306 315
307 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); 316 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler);
308 }; 317 };
309 318
310 } // namespace extensions 319 } // namespace extensions
311 320
312 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 321 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698