| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 typedef std::vector<linked_ptr<management::ExtensionInfo>> ExtensionInfoList; | 55 typedef std::vector<linked_ptr<management::ExtensionInfo>> ExtensionInfoList; |
| 56 typedef std::vector<linked_ptr<management::IconInfo>> IconInfoList; | 56 typedef std::vector<linked_ptr<management::IconInfo>> IconInfoList; |
| 57 | 57 |
| 58 enum AutoConfirmForTest { DO_NOT_SKIP = 0, PROCEED, ABORT }; | 58 enum AutoConfirmForTest { DO_NOT_SKIP = 0, PROCEED, ABORT }; |
| 59 | 59 |
| 60 AutoConfirmForTest auto_confirm_for_test = DO_NOT_SKIP; | 60 AutoConfirmForTest auto_confirm_for_test = DO_NOT_SKIP; |
| 61 | 61 |
| 62 std::vector<std::string> CreateWarningsList(const Extension* extension) { | 62 std::vector<std::string> CreateWarningsList(const Extension* extension) { |
| 63 std::vector<std::string> warnings_list; | 63 std::vector<std::string> warnings_list; |
| 64 for (const base::string16& warning : | 64 for (const base::string16& warning : |
| 65 extension->permissions_data()->GetPermissionMessageStrings()) { | 65 extension->permissions_data()->GetLegacyPermissionMessageStrings()) { |
| 66 warnings_list.push_back(base::UTF16ToUTF8(warning)); | 66 warnings_list.push_back(base::UTF16ToUTF8(warning)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 return warnings_list; | 69 return warnings_list; |
| 70 } | 70 } |
| 71 | 71 |
| 72 std::vector<management::LaunchType> GetAvailableLaunchTypes( | 72 std::vector<management::LaunchType> GetAvailableLaunchTypes( |
| 73 const Extension& extension, | 73 const Extension& extension, |
| 74 const ManagementAPIDelegate* delegate) { | 74 const ManagementAPIDelegate* delegate) { |
| 75 std::vector<management::LaunchType> launch_type_list; | 75 std::vector<management::LaunchType> launch_type_list; |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 ManagementAPI::GetFactoryInstance() { | 915 ManagementAPI::GetFactoryInstance() { |
| 916 return g_factory.Pointer(); | 916 return g_factory.Pointer(); |
| 917 } | 917 } |
| 918 | 918 |
| 919 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 919 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 920 management_event_router_.reset(new ManagementEventRouter(browser_context_)); | 920 management_event_router_.reset(new ManagementEventRouter(browser_context_)); |
| 921 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 921 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 922 } | 922 } |
| 923 | 923 |
| 924 } // namespace extensions | 924 } // namespace extensions |
| OLD | NEW |