OLD | NEW |
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 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" |
6 | 6 |
| 7 #include "apps/app_load_service.h" |
7 #include "base/base64.h" | 8 #include "base/base64.h" |
8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
9 #include "base/file_util.h" | 10 #include "base/file_util.h" |
10 #include "base/i18n/file_util_icu.h" | 11 #include "base/i18n/file_util_icu.h" |
11 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
12 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "chrome/browser/devtools/devtools_window.h" | 15 #include "chrome/browser/devtools/devtools_window.h" |
15 #include "chrome/browser/extensions/api/developer_private/developer_private_api_
factory.h" | 16 #include "chrome/browser/extensions/api/developer_private/developer_private_api_
factory.h" |
16 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" | 17 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 DeveloperPrivateShowPermissionsDialogFunction:: | 542 DeveloperPrivateShowPermissionsDialogFunction:: |
542 DeveloperPrivateShowPermissionsDialogFunction() {} | 543 DeveloperPrivateShowPermissionsDialogFunction() {} |
543 | 544 |
544 DeveloperPrivateShowPermissionsDialogFunction:: | 545 DeveloperPrivateShowPermissionsDialogFunction:: |
545 ~DeveloperPrivateShowPermissionsDialogFunction() {} | 546 ~DeveloperPrivateShowPermissionsDialogFunction() {} |
546 | 547 |
547 bool DeveloperPrivateRestartFunction::RunImpl() { | 548 bool DeveloperPrivateRestartFunction::RunImpl() { |
548 scoped_ptr<Restart::Params> params(Restart::Params::Create(*args_)); | 549 scoped_ptr<Restart::Params> params(Restart::Params::Create(*args_)); |
549 EXTENSION_FUNCTION_VALIDATE(params.get()); | 550 EXTENSION_FUNCTION_VALIDATE(params.get()); |
550 | 551 |
551 ExtensionService* service = profile()->GetExtensionService(); | 552 apps::AppLoadService* service = apps::AppLoadService::Get(profile()); |
552 EXTENSION_FUNCTION_VALIDATE(!params->item_id.empty()); | 553 EXTENSION_FUNCTION_VALIDATE(!params->item_id.empty()); |
553 service->RestartExtension(params->item_id); | 554 service->RestartApplication(params->item_id); |
554 return true; | 555 return true; |
555 } | 556 } |
556 | 557 |
557 DeveloperPrivateRestartFunction::~DeveloperPrivateRestartFunction() {} | 558 DeveloperPrivateRestartFunction::~DeveloperPrivateRestartFunction() {} |
558 | 559 |
559 DeveloperPrivateEnableFunction::DeveloperPrivateEnableFunction() {} | 560 DeveloperPrivateEnableFunction::DeveloperPrivateEnableFunction() {} |
560 | 561 |
561 bool DeveloperPrivateEnableFunction::RunImpl() { | 562 bool DeveloperPrivateEnableFunction::RunImpl() { |
562 scoped_ptr<Enable::Params> params(Enable::Params::Create(*args_)); | 563 scoped_ptr<Enable::Params> params(Enable::Params::Create(*args_)); |
563 EXTENSION_FUNCTION_VALIDATE(params.get()); | 564 EXTENSION_FUNCTION_VALIDATE(params.get()); |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 | 1171 |
1171 #undef SET_STRING | 1172 #undef SET_STRING |
1172 return true; | 1173 return true; |
1173 } | 1174 } |
1174 | 1175 |
1175 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} | 1176 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} |
1176 | 1177 |
1177 } // namespace api | 1178 } // namespace api |
1178 | 1179 |
1179 } // namespace extensions | 1180 } // namespace extensions |
OLD | NEW |