| 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 4363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4374 DictionaryValue* args, | 4374 DictionaryValue* args, |
| 4375 IPC::Message* reply_message) { | 4375 IPC::Message* reply_message) { |
| 4376 AutomationJSONReply reply(this, reply_message); | 4376 AutomationJSONReply reply(this, reply_message); |
| 4377 ExtensionService* service = profile()->GetExtensionService(); | 4377 ExtensionService* service = profile()->GetExtensionService(); |
| 4378 if (!service) { | 4378 if (!service) { |
| 4379 reply.SendError("No extensions service."); | 4379 reply.SendError("No extensions service."); |
| 4380 return; | 4380 return; |
| 4381 } | 4381 } |
| 4382 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); | 4382 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); |
| 4383 ListValue* extensions_values = new ListValue; | 4383 ListValue* extensions_values = new ListValue; |
| 4384 const ExtensionList* extensions = service->extensions(); | 4384 const ExtensionSet* extensions = service->extensions(); |
| 4385 const ExtensionList* disabled_extensions = service->disabled_extensions(); | 4385 const ExtensionSet* disabled_extensions = service->disabled_extensions(); |
| 4386 ExtensionList all; | 4386 ExtensionList all; |
| 4387 all.insert(all.end(), | 4387 all.insert(all.end(), |
| 4388 extensions->begin(), | 4388 extensions->begin(), |
| 4389 extensions->end()); | 4389 extensions->end()); |
| 4390 all.insert(all.end(), | 4390 all.insert(all.end(), |
| 4391 disabled_extensions->begin(), | 4391 disabled_extensions->begin(), |
| 4392 disabled_extensions->end()); | 4392 disabled_extensions->end()); |
| 4393 for (ExtensionList::const_iterator it = all.begin(); | 4393 for (ExtensionList::const_iterator it = all.begin(); |
| 4394 it != all.end(); ++it) { | 4394 it != all.end(); ++it) { |
| 4395 const Extension* extension = *it; | 4395 const Extension* extension = *it; |
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6646 | 6646 |
| 6647 Send(reply_message_); | 6647 Send(reply_message_); |
| 6648 redirect_query_ = 0; | 6648 redirect_query_ = 0; |
| 6649 reply_message_ = NULL; | 6649 reply_message_ = NULL; |
| 6650 } | 6650 } |
| 6651 | 6651 |
| 6652 void TestingAutomationProvider::OnRemoveProvider() { | 6652 void TestingAutomationProvider::OnRemoveProvider() { |
| 6653 if (g_browser_process) | 6653 if (g_browser_process) |
| 6654 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6654 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6655 } | 6655 } |
| OLD | NEW |