Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 8733004: Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: + Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 4361 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 DictionaryValue* args, 4372 DictionaryValue* args,
4373 IPC::Message* reply_message) { 4373 IPC::Message* reply_message) {
4374 AutomationJSONReply reply(this, reply_message); 4374 AutomationJSONReply reply(this, reply_message);
4375 ExtensionService* service = profile()->GetExtensionService(); 4375 ExtensionService* service = profile()->GetExtensionService();
4376 if (!service) { 4376 if (!service) {
4377 reply.SendError("No extensions service."); 4377 reply.SendError("No extensions service.");
4378 return; 4378 return;
4379 } 4379 }
4380 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 4380 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
4381 ListValue* extensions_values = new ListValue; 4381 ListValue* extensions_values = new ListValue;
4382 const ExtensionList* extensions = service->extensions(); 4382 const ExtensionSet* extensions = service->extensions();
4383 const ExtensionList* disabled_extensions = service->disabled_extensions(); 4383 const ExtensionSet* disabled_extensions = service->disabled_extensions();
4384 ExtensionList all; 4384 ExtensionList all;
4385 all.insert(all.end(), 4385 all.insert(all.end(),
4386 extensions->begin(), 4386 extensions->begin(),
4387 extensions->end()); 4387 extensions->end());
4388 all.insert(all.end(), 4388 all.insert(all.end(),
4389 disabled_extensions->begin(), 4389 disabled_extensions->begin(),
4390 disabled_extensions->end()); 4390 disabled_extensions->end());
4391 for (ExtensionList::const_iterator it = all.begin(); 4391 for (ExtensionList::const_iterator it = all.begin();
4392 it != all.end(); ++it) { 4392 it != all.end(); ++it) {
4393 const Extension* extension = *it; 4393 const Extension* extension = *it;
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
6593 6593
6594 Send(reply_message_); 6594 Send(reply_message_);
6595 redirect_query_ = 0; 6595 redirect_query_ = 0;
6596 reply_message_ = NULL; 6596 reply_message_ = NULL;
6597 } 6597 }
6598 6598
6599 void TestingAutomationProvider::OnRemoveProvider() { 6599 void TestingAutomationProvider::OnRemoveProvider() {
6600 if (g_browser_process) 6600 if (g_browser_process)
6601 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6601 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6602 } 6602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698