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

Side by Side Diff: content/browser/gpu/gpu_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/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 CommandLine::StringType gpu_launcher = 952 CommandLine::StringType gpu_launcher =
953 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher); 953 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher);
954 954
955 #if defined(OS_LINUX) 955 #if defined(OS_LINUX)
956 int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF : 956 int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
957 ChildProcessHost::CHILD_NORMAL; 957 ChildProcessHost::CHILD_NORMAL;
958 #else 958 #else
959 int child_flags = ChildProcessHost::CHILD_NORMAL; 959 int child_flags = ChildProcessHost::CHILD_NORMAL;
960 #endif 960 #endif
961 961
962 FilePath exe_path = ChildProcessHost::GetChildPath(child_flags); 962 base::FilePath exe_path = ChildProcessHost::GetChildPath(child_flags);
963 if (exe_path.empty()) 963 if (exe_path.empty())
964 return false; 964 return false;
965 965
966 CommandLine* cmd_line = new CommandLine(exe_path); 966 CommandLine* cmd_line = new CommandLine(exe_path);
967 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); 967 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
968 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 968 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
969 969
970 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) 970 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED)
971 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); 971 cmd_line->AppendSwitch(switches::kDisableGpuSandbox);
972 972
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 // process so the DLL unloads itself. http://crbug/129884 1026 // process so the DLL unloads itself. http://crbug/129884
1027 cmd_line->AppendSwitchASCII("ignored", " --type=renderer "); 1027 cmd_line->AppendSwitchASCII("ignored", " --type=renderer ");
1028 #endif 1028 #endif
1029 1029
1030 // If specified, prepend a launcher program to the command line. 1030 // If specified, prepend a launcher program to the command line.
1031 if (!gpu_launcher.empty()) 1031 if (!gpu_launcher.empty())
1032 cmd_line->PrependWrapper(gpu_launcher); 1032 cmd_line->PrependWrapper(gpu_launcher);
1033 1033
1034 process_->Launch( 1034 process_->Launch(
1035 #if defined(OS_WIN) 1035 #if defined(OS_WIN)
1036 FilePath(), 1036 base::FilePath(),
1037 #elif defined(OS_POSIX) 1037 #elif defined(OS_POSIX)
1038 false, 1038 false,
1039 base::EnvironmentVector(), 1039 base::EnvironmentVector(),
1040 #endif 1040 #endif
1041 cmd_line); 1041 cmd_line);
1042 process_launched_ = true; 1042 process_launched_ = true;
1043 1043
1044 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", 1044 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents",
1045 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX); 1045 LAUNCHED, GPU_PROCESS_LIFETIME_EVENT_MAX);
1046 return true; 1046 return true;
(...skipping 12 matching lines...) Expand all
1059 void GpuProcessHost::BlockLiveOffscreenContexts() { 1059 void GpuProcessHost::BlockLiveOffscreenContexts() {
1060 for (std::multiset<GURL>::iterator iter = 1060 for (std::multiset<GURL>::iterator iter =
1061 urls_with_live_offscreen_contexts_.begin(); 1061 urls_with_live_offscreen_contexts_.begin();
1062 iter != urls_with_live_offscreen_contexts_.end(); ++iter) { 1062 iter != urls_with_live_offscreen_contexts_.end(); ++iter) {
1063 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( 1063 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
1064 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN); 1064 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN);
1065 } 1065 }
1066 } 1066 }
1067 1067
1068 } // namespace content 1068 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_pixel_browsertest.cc ('k') | content/browser/gpu/webgl_conformance_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698