| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4005 for (URLPatternList::const_iterator perm = pattern_list.begin(); | 4005 for (URLPatternList::const_iterator perm = pattern_list.begin(); |
| 4006 perm != pattern_list.end(); ++perm) { | 4006 perm != pattern_list.end(); ++perm) { |
| 4007 permissions->Append(new StringValue(perm->GetAsString())); | 4007 permissions->Append(new StringValue(perm->GetAsString())); |
| 4008 } | 4008 } |
| 4009 | 4009 |
| 4010 return permissions; | 4010 return permissions; |
| 4011 } | 4011 } |
| 4012 | 4012 |
| 4013 ListValue* GetAPIPermissions(const Extension* ext) { | 4013 ListValue* GetAPIPermissions(const Extension* ext) { |
| 4014 ListValue* permissions = new ListValue; | 4014 ListValue* permissions = new ListValue; |
| 4015 std::set<std::string> perm_list = ext->api_permissions(); | 4015 std::set<std::string> perm_list = ext->permission_set().GetAPIsAsStrings(); |
| 4016 for (std::set<std::string>::const_iterator perm = perm_list.begin(); | 4016 for (std::set<std::string>::const_iterator perm = perm_list.begin(); |
| 4017 perm != perm_list.end(); ++perm) { | 4017 perm != perm_list.end(); ++perm) { |
| 4018 permissions->Append(new StringValue(perm->c_str())); | 4018 permissions->Append(new StringValue(perm->c_str())); |
| 4019 } | 4019 } |
| 4020 return permissions; | 4020 return permissions; |
| 4021 } | 4021 } |
| 4022 | 4022 |
| 4023 } // namespace | 4023 } // namespace |
| 4024 | 4024 |
| 4025 // Sample json input: { "command": "GetExtensionsInfo" } | 4025 // Sample json input: { "command": "GetExtensionsInfo" } |
| (...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5889 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 5889 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
| 5890 | 5890 |
| 5891 Send(reply_message_); | 5891 Send(reply_message_); |
| 5892 redirect_query_ = 0; | 5892 redirect_query_ = 0; |
| 5893 reply_message_ = NULL; | 5893 reply_message_ = NULL; |
| 5894 } | 5894 } |
| 5895 | 5895 |
| 5896 void TestingAutomationProvider::OnRemoveProvider() { | 5896 void TestingAutomationProvider::OnRemoveProvider() { |
| 5897 AutomationProviderList::GetInstance()->RemoveProvider(this); | 5897 AutomationProviderList::GetInstance()->RemoveProvider(this); |
| 5898 } | 5898 } |
| OLD | NEW |