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

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

Issue 7714018: Give plug-in processes an executable heap and disable PIE/ASLR for Native (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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/app/helper-Info.plist ('k') | chrome/browser/importer/profile_import_process_host.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 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 tab->Set("infobars", GetInfobarsInfo(tc)); 2767 tab->Set("infobars", GetInfobarsInfo(tc));
2768 tab->SetBoolean("pinned", browser->IsTabPinned(i)); 2768 tab->SetBoolean("pinned", browser->IsTabPinned(i));
2769 tabs->Append(tab); 2769 tabs->Append(tab);
2770 } 2770 }
2771 browser_item->Set("tabs", tabs); 2771 browser_item->Set("tabs", tabs);
2772 2772
2773 windows->Append(browser_item); 2773 windows->Append(browser_item);
2774 } 2774 }
2775 return_value->Set("windows", windows); 2775 return_value->Set("windows", windows);
2776 2776
2777 #if defined(OS_LINUX)
2778 int flags = ChildProcessHost::CHILD_ALLOW_SELF;
2779 #else
2780 int flags = ChildProcessHost::CHILD_NORMAL;
2781 #endif
2782
2777 return_value->SetString("child_process_path", 2783 return_value->SetString("child_process_path",
2778 ChildProcessHost::GetChildPath(true).value()); 2784 ChildProcessHost::GetChildPath(flags).value());
2779 // Child processes are the processes for plugins and other workers. 2785 // Child processes are the processes for plugins and other workers.
2780 // Add all child processes in a list of dictionaries, one dictionary item 2786 // Add all child processes in a list of dictionaries, one dictionary item
2781 // per child process. 2787 // per child process.
2782 ListValue* child_processes = new ListValue; 2788 ListValue* child_processes = new ListValue;
2783 base::WaitableEvent event(true /* manual reset */, 2789 base::WaitableEvent event(true /* manual reset */,
2784 false /* not initially signaled */); 2790 false /* not initially signaled */);
2785 CHECK(BrowserThread::PostTask( 2791 CHECK(BrowserThread::PostTask(
2786 BrowserThread::IO, FROM_HERE, 2792 BrowserThread::IO, FROM_HERE,
2787 new GetChildProcessHostInfoTask(&event, child_processes))); 2793 new GetChildProcessHostInfoTask(&event, child_processes)));
2788 event.Wait(); 2794 event.Wait();
(...skipping 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 return; 5817 return;
5812 } 5818 }
5813 if (!args->GetInteger("view.render_view_id", &render_view_id)) { 5819 if (!args->GetInteger("view.render_view_id", &render_view_id)) {
5814 AutomationJSONReply(this, reply_message) 5820 AutomationJSONReply(this, reply_message)
5815 .SendError("'view.render_view_id' missing or invalid"); 5821 .SendError("'view.render_view_id' missing or invalid");
5816 return; 5822 return;
5817 } 5823 }
5818 5824
5819 RenderViewHost* rvh = RenderViewHost::FromID(render_process_id, 5825 RenderViewHost* rvh = RenderViewHost::FromID(render_process_id,
5820 render_view_id); 5826 render_view_id);
5821 if(!rvh) { 5827 if (!rvh) {
5822 AutomationJSONReply(this, reply_message).SendError( 5828 AutomationJSONReply(this, reply_message).SendError(
5823 "A RenderViewHost object was not found with the given view ID."); 5829 "A RenderViewHost object was not found with the given view ID.");
5824 return; 5830 return;
5825 } 5831 }
5826 5832
5827 new DomOperationMessageSender(this, reply_message, true); 5833 new DomOperationMessageSender(this, reply_message, true);
5828 ExecuteJavascriptInRenderViewFrame(frame_xpath, javascript, reply_message, 5834 ExecuteJavascriptInRenderViewFrame(frame_xpath, javascript, reply_message,
5829 rvh); 5835 rvh);
5830 } 5836 }
5831 5837
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 6274 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
6269 6275
6270 Send(reply_message_); 6276 Send(reply_message_);
6271 redirect_query_ = 0; 6277 redirect_query_ = 0;
6272 reply_message_ = NULL; 6278 reply_message_ = NULL;
6273 } 6279 }
6274 6280
6275 void TestingAutomationProvider::OnRemoveProvider() { 6281 void TestingAutomationProvider::OnRemoveProvider() {
6276 AutomationProviderList::GetInstance()->RemoveProvider(this); 6282 AutomationProviderList::GetInstance()->RemoveProvider(this);
6277 } 6283 }
OLDNEW
« no previous file with comments | « chrome/app/helper-Info.plist ('k') | chrome/browser/importer/profile_import_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698