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

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

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 4 months 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
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after
3380 DictionaryValue* args, 3380 DictionaryValue* args,
3381 IPC::Message* reply_message) { 3381 IPC::Message* reply_message) {
3382 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { 3382 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
3383 BrowserThread::PostTask( 3383 BrowserThread::PostTask(
3384 BrowserThread::FILE, FROM_HERE, 3384 BrowserThread::FILE, FROM_HERE,
3385 base::Bind(&TestingAutomationProvider::GetPluginsInfo, 3385 base::Bind(&TestingAutomationProvider::GetPluginsInfo,
3386 this, browser, args, reply_message)); 3386 this, browser, args, reply_message));
3387 return; 3387 return;
3388 } 3388 }
3389 std::vector<webkit::npapi::WebPluginInfo> plugins; 3389 std::vector<webkit::npapi::WebPluginInfo> plugins;
3390 webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins); 3390 webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins);
3391 ListValue* items = new ListValue; 3391 ListValue* items = new ListValue;
3392 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it = 3392 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
3393 plugins.begin(); 3393 plugins.begin();
3394 it != plugins.end(); 3394 it != plugins.end();
3395 ++it) { 3395 ++it) {
3396 DictionaryValue* item = new DictionaryValue; 3396 DictionaryValue* item = new DictionaryValue;
3397 item->SetString("name", it->name); 3397 item->SetString("name", it->name);
3398 item->SetString("path", it->path.value()); 3398 item->SetString("path", it->path.value());
3399 item->SetString("version", it->version); 3399 item->SetString("version", it->version);
3400 item->SetString("desc", it->desc); 3400 item->SetString("desc", it->desc);
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
6136 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6136 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6137 6137
6138 Send(reply_message_); 6138 Send(reply_message_);
6139 redirect_query_ = 0; 6139 redirect_query_ = 0;
6140 reply_message_ = NULL; 6140 reply_message_ = NULL;
6141 } 6141 }
6142 6142
6143 void TestingAutomationProvider::OnRemoveProvider() { 6143 void TestingAutomationProvider::OnRemoveProvider() {
6144 AutomationProviderList::GetInstance()->RemoveProvider(this); 6144 AutomationProviderList::GetInstance()->RemoveProvider(this);
6145 } 6145 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698