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

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

Issue 7627001: Revert r96364, it's breaking a NaCl test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make it prettier 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 | « chrome/browser/about_flags.cc ('k') | 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/importer/importer_host.h" 52 #include "chrome/browser/importer/importer_host.h"
53 #include "chrome/browser/importer/importer_list.h" 53 #include "chrome/browser/importer/importer_list.h"
54 #include "chrome/browser/instant/instant_controller.h" 54 #include "chrome/browser/instant/instant_controller.h"
55 #include "chrome/browser/notifications/balloon.h" 55 #include "chrome/browser/notifications/balloon.h"
56 #include "chrome/browser/notifications/balloon_collection.h" 56 #include "chrome/browser/notifications/balloon_collection.h"
57 #include "chrome/browser/notifications/notification.h" 57 #include "chrome/browser/notifications/notification.h"
58 #include "chrome/browser/notifications/notification_ui_manager.h" 58 #include "chrome/browser/notifications/notification_ui_manager.h"
59 #include "chrome/browser/password_manager/password_store.h" 59 #include "chrome/browser/password_manager/password_store.h"
60 #include "chrome/browser/password_manager/password_store_change.h" 60 #include "chrome/browser/password_manager/password_store_change.h"
61 #include "chrome/browser/platform_util.h" 61 #include "chrome/browser/platform_util.h"
62 #include "chrome/browser/plugin_prefs.h"
63 #include "chrome/browser/prefs/pref_service.h" 62 #include "chrome/browser/prefs/pref_service.h"
64 #include "chrome/browser/profiles/profile.h" 63 #include "chrome/browser/profiles/profile.h"
65 #include "chrome/browser/profiles/profile_manager.h" 64 #include "chrome/browser/profiles/profile_manager.h"
66 #include "chrome/browser/search_engines/template_url.h" 65 #include "chrome/browser/search_engines/template_url.h"
67 #include "chrome/browser/search_engines/template_url_service.h" 66 #include "chrome/browser/search_engines/template_url_service.h"
68 #include "chrome/browser/search_engines/template_url_service_factory.h" 67 #include "chrome/browser/search_engines/template_url_service_factory.h"
69 #include "chrome/browser/sessions/restore_tab_helper.h" 68 #include "chrome/browser/sessions/restore_tab_helper.h"
70 #include "chrome/browser/sessions/session_service_factory.h" 69 #include "chrome/browser/sessions/session_service_factory.h"
71 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 70 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
72 #include "chrome/browser/tab_contents/link_infobar_delegate.h" 71 #include "chrome/browser/tab_contents/link_infobar_delegate.h"
(...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after
3397 IPC::Message* reply_message) { 3396 IPC::Message* reply_message) {
3398 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { 3397 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
3399 BrowserThread::PostTask( 3398 BrowserThread::PostTask(
3400 BrowserThread::FILE, FROM_HERE, 3399 BrowserThread::FILE, FROM_HERE,
3401 base::Bind(&TestingAutomationProvider::GetPluginsInfo, 3400 base::Bind(&TestingAutomationProvider::GetPluginsInfo,
3402 this, browser, args, reply_message)); 3401 this, browser, args, reply_message));
3403 return; 3402 return;
3404 } 3403 }
3405 std::vector<webkit::npapi::WebPluginInfo> plugins; 3404 std::vector<webkit::npapi::WebPluginInfo> plugins;
3406 webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); 3405 webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins);
3407 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser->profile());
3408 ListValue* items = new ListValue; 3406 ListValue* items = new ListValue;
3409 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it = 3407 for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
3410 plugins.begin(); 3408 plugins.begin();
3411 it != plugins.end(); 3409 it != plugins.end();
3412 ++it) { 3410 ++it) {
3413 DictionaryValue* item = new DictionaryValue; 3411 DictionaryValue* item = new DictionaryValue;
3414 item->SetString("name", it->name); 3412 item->SetString("name", it->name);
3415 item->SetString("path", it->path.value()); 3413 item->SetString("path", it->path.value());
3416 item->SetString("version", it->version); 3414 item->SetString("version", it->version);
3417 item->SetString("desc", it->desc); 3415 item->SetString("desc", it->desc);
3418 item->SetBoolean("enabled", plugin_prefs->IsPluginEnabled(*it)); 3416 item->SetBoolean("enabled", webkit::npapi::IsPluginEnabled(*it));
3419 // Add info about mime types. 3417 // Add info about mime types.
3420 ListValue* mime_types = new ListValue(); 3418 ListValue* mime_types = new ListValue();
3421 for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it = 3419 for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it =
3422 it->mime_types.begin(); 3420 it->mime_types.begin();
3423 type_it != it->mime_types.end(); 3421 type_it != it->mime_types.end();
3424 ++type_it) { 3422 ++type_it) {
3425 DictionaryValue* mime_type = new DictionaryValue(); 3423 DictionaryValue* mime_type = new DictionaryValue();
3426 mime_type->SetString("mimeType", type_it->mime_type); 3424 mime_type->SetString("mimeType", type_it->mime_type);
3427 mime_type->SetString("description", type_it->description); 3425 mime_type->SetString("description", type_it->description);
3428 3426
(...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after
6155 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6153 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6156 6154
6157 Send(reply_message_); 6155 Send(reply_message_);
6158 redirect_query_ = 0; 6156 redirect_query_ = 0;
6159 reply_message_ = NULL; 6157 reply_message_ = NULL;
6160 } 6158 }
6161 6159
6162 void TestingAutomationProvider::OnRemoveProvider() { 6160 void TestingAutomationProvider::OnRemoveProvider() {
6163 AutomationProviderList::GetInstance()->RemoveProvider(this); 6161 AutomationProviderList::GetInstance()->RemoveProvider(this);
6164 } 6162 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698