| 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 "extensions/browser/api/management/management_api.h" | 5 #include "extensions/browser/api/management/management_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 492 |
| 493 void ManagementSetEnabledFunction::OnRequirementsChecked( | 493 void ManagementSetEnabledFunction::OnRequirementsChecked( |
| 494 const std::vector<std::string>& requirements_errors) { | 494 const std::vector<std::string>& requirements_errors) { |
| 495 if (requirements_errors.empty()) { | 495 if (requirements_errors.empty()) { |
| 496 ManagementAPI::GetFactoryInstance()->Get(browser_context())->GetDelegate()-> | 496 ManagementAPI::GetFactoryInstance()->Get(browser_context())->GetDelegate()-> |
| 497 EnableExtension(browser_context(), extension_id_); | 497 EnableExtension(browser_context(), extension_id_); |
| 498 Respond(NoArguments()); | 498 Respond(NoArguments()); |
| 499 } else { | 499 } else { |
| 500 // TODO(devlin): Should we really be noisy here all the time? | 500 // TODO(devlin): Should we really be noisy here all the time? |
| 501 Respond(Error(keys::kMissingRequirementsError, | 501 Respond(Error(keys::kMissingRequirementsError, |
| 502 base::JoinString(requirements_errors, " "))); | 502 JoinString(requirements_errors, ' '))); |
| 503 } | 503 } |
| 504 } | 504 } |
| 505 | 505 |
| 506 ManagementUninstallFunctionBase::ManagementUninstallFunctionBase() { | 506 ManagementUninstallFunctionBase::ManagementUninstallFunctionBase() { |
| 507 } | 507 } |
| 508 | 508 |
| 509 ManagementUninstallFunctionBase::~ManagementUninstallFunctionBase() { | 509 ManagementUninstallFunctionBase::~ManagementUninstallFunctionBase() { |
| 510 } | 510 } |
| 511 | 511 |
| 512 ExtensionFunction::ResponseAction ManagementUninstallFunctionBase::Uninstall( | 512 ExtensionFunction::ResponseAction ManagementUninstallFunctionBase::Uninstall( |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 ManagementAPI::GetFactoryInstance() { | 899 ManagementAPI::GetFactoryInstance() { |
| 900 return g_factory.Pointer(); | 900 return g_factory.Pointer(); |
| 901 } | 901 } |
| 902 | 902 |
| 903 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 903 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 904 management_event_router_.reset(new ManagementEventRouter(browser_context_)); | 904 management_event_router_.reset(new ManagementEventRouter(browser_context_)); |
| 905 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 905 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 906 } | 906 } |
| 907 | 907 |
| 908 } // namespace extensions | 908 } // namespace extensions |
| OLD | NEW |