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

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 191093002: Simplify the user agent code some more since after r255534 it's not affected by the site's URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: patchset 15 which works Created 6 years, 9 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/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 #if defined(OS_WIN) 199 #if defined(OS_WIN)
200 switches::kHighDPISupport, 200 switches::kHighDPISupport,
201 #endif 201 #endif
202 switches::kLoggingLevel, 202 switches::kLoggingLevel,
203 switches::kLogPluginMessages, 203 switches::kLogPluginMessages,
204 switches::kNoSandbox, 204 switches::kNoSandbox,
205 switches::kPluginStartupDialog, 205 switches::kPluginStartupDialog,
206 switches::kTestSandbox, 206 switches::kTestSandbox,
207 switches::kTraceStartup, 207 switches::kTraceStartup,
208 switches::kUseGL, 208 switches::kUseGL,
209 switches::kUserAgent,
210 }; 209 };
211 210
212 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 211 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
213 arraysize(kSwitchNames)); 212 arraysize(kSwitchNames));
214 213
215 GpuDataManagerImpl::GetInstance()->AppendPluginCommandLine(cmd_line); 214 GpuDataManagerImpl::GetInstance()->AppendPluginCommandLine(cmd_line);
216 215
217 // If specified, prepend a launcher program to the command line. 216 // If specified, prepend a launcher program to the command line.
218 if (!plugin_launcher.empty()) 217 if (!plugin_launcher.empty())
219 cmd_line->PrependWrapper(plugin_launcher); 218 cmd_line->PrependWrapper(plugin_launcher);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 429
431 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, 430 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request,
432 ResourceContext** resource_context, 431 ResourceContext** resource_context,
433 net::URLRequestContext** request_context) { 432 net::URLRequestContext** request_context) {
434 *resource_context = 433 *resource_context =
435 resource_context_map_[request.origin_pid].resource_context; 434 resource_context_map_[request.origin_pid].resource_context;
436 *request_context = (*resource_context)->GetRequestContext(); 435 *request_context = (*resource_context)->GetRequestContext();
437 } 436 }
438 437
439 } // namespace content 438 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698