OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |