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 "apps/app_load_service.h" |
8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
9 #include "apps/app_window.h" | 9 #include "apps/app_window.h" |
10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 | 836 |
837 void DeveloperPrivateEnableFunction::OnRequirementsChecked( | 837 void DeveloperPrivateEnableFunction::OnRequirementsChecked( |
838 std::string extension_id, | 838 std::string extension_id, |
839 std::vector<std::string> requirements_errors) { | 839 std::vector<std::string> requirements_errors) { |
840 if (requirements_errors.empty()) { | 840 if (requirements_errors.empty()) { |
841 ExtensionService* service = GetProfile()->GetExtensionService(); | 841 ExtensionService* service = GetProfile()->GetExtensionService(); |
842 service->EnableExtension(extension_id); | 842 service->EnableExtension(extension_id); |
843 } else { | 843 } else { |
844 ExtensionErrorReporter::GetInstance()->ReportError( | 844 ExtensionErrorReporter::GetInstance()->ReportError( |
845 base::UTF8ToUTF16(JoinString(requirements_errors, ' ')), | 845 base::UTF8ToUTF16(JoinString(requirements_errors, ' ')), |
846 true, // Be noisy. | 846 true); // Be noisy. |
847 NULL); // Caller expects no response. | |
848 } | 847 } |
849 Release(); | 848 Release(); |
850 } | 849 } |
851 | 850 |
852 DeveloperPrivateEnableFunction::~DeveloperPrivateEnableFunction() {} | 851 DeveloperPrivateEnableFunction::~DeveloperPrivateEnableFunction() {} |
853 | 852 |
854 bool DeveloperPrivateInspectFunction::RunImpl() { | 853 bool DeveloperPrivateInspectFunction::RunImpl() { |
855 scoped_ptr<developer::Inspect::Params> params( | 854 scoped_ptr<developer::Inspect::Params> params( |
856 developer::Inspect::Params::Create(*args_)); | 855 developer::Inspect::Params::Create(*args_)); |
857 EXTENSION_FUNCTION_VALIDATE(params.get() != NULL); | 856 EXTENSION_FUNCTION_VALIDATE(params.get() != NULL); |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 } | 1353 } |
1355 | 1354 |
1356 error_ui_util::HandleOpenDevTools(dict); | 1355 error_ui_util::HandleOpenDevTools(dict); |
1357 | 1356 |
1358 return true; | 1357 return true; |
1359 } | 1358 } |
1360 | 1359 |
1361 } // namespace api | 1360 } // namespace api |
1362 | 1361 |
1363 } // namespace extensions | 1362 } // namespace extensions |
OLD | NEW |