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

Side by Side Diff: apps/app_load_service.cc

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: Fixed be_noisy, support interaction with multiple failures 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_load_service.h" 5 #include "apps/app_load_service.h"
6 6
7 #include "apps/app_load_service_factory.h" 7 #include "apps/app_load_service_factory.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "apps/launcher.h" 9 #include "apps/launcher.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 29 matching lines...) Expand all
40 content::NotificationService::AllSources()); 40 content::NotificationService::AllSources());
41 } 41 }
42 42
43 AppLoadService::~AppLoadService() {} 43 AppLoadService::~AppLoadService() {}
44 44
45 void AppLoadService::RestartApplication(const std::string& extension_id) { 45 void AppLoadService::RestartApplication(const std::string& extension_id) {
46 post_reload_actions_[extension_id].action_type = RESTART; 46 post_reload_actions_[extension_id].action_type = RESTART;
47 ExtensionService* service = extensions::ExtensionSystem::Get(profile_)-> 47 ExtensionService* service = extensions::ExtensionSystem::Get(profile_)->
48 extension_service(); 48 extension_service();
49 DCHECK(service); 49 DCHECK(service);
50 service->ReloadExtension(extension_id); 50 service->ReloadExtension(extension_id, true);
Devlin 2014/07/01 22:14:17 document anonymous bool.
gpdavis 2014/07/01 23:48:09 Done.
51 } 51 }
52 52
53 bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path, 53 bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path,
54 const CommandLine& command_line, 54 const CommandLine& command_line,
55 const base::FilePath& current_dir) { 55 const base::FilePath& current_dir) {
56 ExtensionService* extension_service = 56 ExtensionService* extension_service =
57 ExtensionSystem::Get(profile_)->extension_service(); 57 ExtensionSystem::Get(profile_)->extension_service();
58 std::string extension_id; 58 std::string extension_id;
59 if (!extensions::UnpackedInstaller::Create(extension_service)-> 59 if (!extensions::UnpackedInstaller::Create(extension_service)->
60 LoadFromCommandLine(base::FilePath(extension_path), &extension_id)) { 60 LoadFromCommandLine(base::FilePath(extension_path), &extension_id)) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Extension::DISABLE_RELOAD) != 0; 137 Extension::DISABLE_RELOAD) != 0;
138 } 138 }
139 return false; 139 return false;
140 } 140 }
141 141
142 bool AppLoadService::HasPostReloadAction(const std::string& extension_id) { 142 bool AppLoadService::HasPostReloadAction(const std::string& extension_id) {
143 return post_reload_actions_.find(extension_id) != post_reload_actions_.end(); 143 return post_reload_actions_.find(extension_id) != post_reload_actions_.end();
144 } 144 }
145 145
146 } // namespace apps 146 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | chrome/browser/extensions/extension_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698