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 4353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4364 DictionaryValue* args, | 4364 DictionaryValue* args, |
4365 IPC::Message* reply_message) { | 4365 IPC::Message* reply_message) { |
4366 AutomationJSONReply reply(this, reply_message); | 4366 AutomationJSONReply reply(this, reply_message); |
4367 ExtensionService* service = profile()->GetExtensionService(); | 4367 ExtensionService* service = profile()->GetExtensionService(); |
4368 if (!service) { | 4368 if (!service) { |
4369 reply.SendError("No extensions service."); | 4369 reply.SendError("No extensions service."); |
4370 return; | 4370 return; |
4371 } | 4371 } |
4372 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); | 4372 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); |
4373 ListValue* extensions_values = new ListValue; | 4373 ListValue* extensions_values = new ListValue; |
4374 const ExtensionList* extensions = service->extensions(); | 4374 const ExtensionSet* extensions = service->extensions(); |
4375 const ExtensionList* disabled_extensions = service->disabled_extensions(); | 4375 const ExtensionSet* disabled_extensions = service->disabled_extensions(); |
4376 ExtensionList all; | 4376 ExtensionList all; |
4377 all.insert(all.end(), | 4377 all.insert(all.end(), |
4378 extensions->begin(), | 4378 extensions->begin(), |
4379 extensions->end()); | 4379 extensions->end()); |
4380 all.insert(all.end(), | 4380 all.insert(all.end(), |
4381 disabled_extensions->begin(), | 4381 disabled_extensions->begin(), |
4382 disabled_extensions->end()); | 4382 disabled_extensions->end()); |
4383 for (ExtensionList::const_iterator it = all.begin(); | 4383 for (ExtensionList::const_iterator it = all.begin(); |
4384 it != all.end(); ++it) { | 4384 it != all.end(); ++it) { |
4385 const Extension* extension = *it; | 4385 const Extension* extension = *it; |
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6430 | 6430 |
6431 Send(reply_message_); | 6431 Send(reply_message_); |
6432 redirect_query_ = 0; | 6432 redirect_query_ = 0; |
6433 reply_message_ = NULL; | 6433 reply_message_ = NULL; |
6434 } | 6434 } |
6435 | 6435 |
6436 void TestingAutomationProvider::OnRemoveProvider() { | 6436 void TestingAutomationProvider::OnRemoveProvider() { |
6437 if (g_browser_process) | 6437 if (g_browser_process) |
6438 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6438 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
6439 } | 6439 } |
OLD | NEW |