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

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: Moved path handling back to C++ 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
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/app/generated_resources.grd » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Reload the extension and allow noisy notifications.
Devlin 2014/07/02 17:46:50 Nice, but a little verbose. Simply service->Reloa
51 service->ReloadExtension(extension_id, true);
51 } 52 }
52 53
53 bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path, 54 bool AppLoadService::LoadAndLaunch(const base::FilePath& extension_path,
54 const CommandLine& command_line, 55 const CommandLine& command_line,
55 const base::FilePath& current_dir) { 56 const base::FilePath& current_dir) {
56 ExtensionService* extension_service = 57 ExtensionService* extension_service =
57 ExtensionSystem::Get(profile_)->extension_service(); 58 ExtensionSystem::Get(profile_)->extension_service();
58 std::string extension_id; 59 std::string extension_id;
59 if (!extensions::UnpackedInstaller::Create(extension_service)-> 60 if (!extensions::UnpackedInstaller::Create(extension_service)->
60 LoadFromCommandLine(base::FilePath(extension_path), &extension_id)) { 61 LoadFromCommandLine(base::FilePath(extension_path), &extension_id)) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Extension::DISABLE_RELOAD) != 0; 138 Extension::DISABLE_RELOAD) != 0;
138 } 139 }
139 return false; 140 return false;
140 } 141 }
141 142
142 bool AppLoadService::HasPostReloadAction(const std::string& extension_id) { 143 bool AppLoadService::HasPostReloadAction(const std::string& extension_id) {
143 return post_reload_actions_.find(extension_id) != post_reload_actions_.end(); 144 return post_reload_actions_.find(extension_id) != post_reload_actions_.end();
144 } 145 }
145 146
146 } // namespace apps 147 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/app/generated_resources.grd » ('J')

Powered by Google App Engine
This is Rietveld 408576698