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

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/worker_host/worker_process_host.h" 5 #include "content/browser/worker_host/worker_process_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::string channel_id = process_->GetHost()->CreateChannel(); 129 std::string channel_id = process_->GetHost()->CreateChannel();
130 if (channel_id.empty()) 130 if (channel_id.empty())
131 return false; 131 return false;
132 132
133 #if defined(OS_LINUX) 133 #if defined(OS_LINUX)
134 int flags = ChildProcessHost::CHILD_ALLOW_SELF; 134 int flags = ChildProcessHost::CHILD_ALLOW_SELF;
135 #else 135 #else
136 int flags = ChildProcessHost::CHILD_NORMAL; 136 int flags = ChildProcessHost::CHILD_NORMAL;
137 #endif 137 #endif
138 138
139 FilePath exe_path = ChildProcessHost::GetChildPath(flags); 139 base::FilePath exe_path = ChildProcessHost::GetChildPath(flags);
140 if (exe_path.empty()) 140 if (exe_path.empty())
141 return false; 141 return false;
142 142
143 CommandLine* cmd_line = new CommandLine(exe_path); 143 CommandLine* cmd_line = new CommandLine(exe_path);
144 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess); 144 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess);
145 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 145 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
146 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); 146 std::string locale = GetContentClient()->browser()->GetApplicationLocale();
147 cmd_line->AppendSwitchASCII(switches::kLang, locale); 147 cmd_line->AppendSwitchASCII(switches::kLang, locale);
148 148
149 static const char* const kSwitchNames[] = { 149 static const char* const kSwitchNames[] = {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // launches a new xterm, and runs the worker process in gdb, reading 184 // launches a new xterm, and runs the worker process in gdb, reading
185 // optional commands from gdb_chrome file in the working directory. 185 // optional commands from gdb_chrome file in the working directory.
186 cmd_line->PrependWrapper("xterm -e gdb -x gdb_chrome --args"); 186 cmd_line->PrependWrapper("xterm -e gdb -x gdb_chrome --args");
187 use_zygote = false; 187 use_zygote = false;
188 } 188 }
189 } 189 }
190 #endif 190 #endif
191 191
192 process_->Launch( 192 process_->Launch(
193 #if defined(OS_WIN) 193 #if defined(OS_WIN)
194 FilePath(), 194 base::FilePath(),
195 #elif defined(OS_POSIX) 195 #elif defined(OS_POSIX)
196 use_zygote, 196 use_zygote,
197 base::EnvironmentVector(), 197 base::EnvironmentVector(),
198 #endif 198 #endif
199 cmd_line); 199 cmd_line);
200 200
201 ChildProcessSecurityPolicyImpl::GetInstance()->AddWorker( 201 ChildProcessSecurityPolicyImpl::GetInstance()->AddWorker(
202 process_->GetData().id, render_process_id); 202 process_->GetData().id, render_process_id);
203 CreateMessageFilters(render_process_id); 203 CreateMessageFilters(render_process_id);
204 204
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 return false; 667 return false;
668 } 668 }
669 669
670 WorkerProcessHost::WorkerInstance::FilterInfo 670 WorkerProcessHost::WorkerInstance::FilterInfo
671 WorkerProcessHost::WorkerInstance::GetFilter() const { 671 WorkerProcessHost::WorkerInstance::GetFilter() const {
672 DCHECK(NumFilters() == 1); 672 DCHECK(NumFilters() == 1);
673 return *filters_.begin(); 673 return *filters_.begin();
674 } 674 }
675 675
676 } // namespace content 676 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/worker_host/test/worker_browsertest.cc ('k') | content/browser/zygote_host/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698