Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 params->extra_headers = entry.extra_headers(); | 229 params->extra_headers = entry.extra_headers(); |
| 230 params->transferred_request_child_id = | 230 params->transferred_request_child_id = |
| 231 entry.transferred_global_request_id().child_id; | 231 entry.transferred_global_request_id().child_id; |
| 232 params->transferred_request_request_id = | 232 params->transferred_request_request_id = |
| 233 entry.transferred_global_request_id().request_id; | 233 entry.transferred_global_request_id().request_id; |
| 234 params->is_overriding_user_agent = entry.GetIsOverridingUserAgent(); | 234 params->is_overriding_user_agent = entry.GetIsOverridingUserAgent(); |
| 235 // Avoid downloading when in view-source mode. | 235 // Avoid downloading when in view-source mode. |
| 236 params->allow_download = !entry.IsViewSourceMode(); | 236 params->allow_download = !entry.IsViewSourceMode(); |
| 237 params->embedder_channel_name = embedder_channel_name; | 237 params->embedder_channel_name = embedder_channel_name; |
| 238 params->embedder_container_id = embedder_container_id; | 238 params->embedder_container_id = embedder_container_id; |
| 239 params->is_post = entry.GetHasPostData(); | |
| 240 if(entry.GetBrowserInitiatedPostData().get()) { | |
| 241 params->browser_initiated_post_data = | |
|
boliu
2012/07/30 18:52:42
A copy can be saved here by using vector::swap ins
| |
| 242 entry.GetBrowserInitiatedPostData()->data(); | |
| 243 } | |
| 239 | 244 |
| 240 if (delegate) | 245 if (delegate) |
| 241 delegate->AddNavigationHeaders(params->url, ¶ms->extra_headers); | 246 delegate->AddNavigationHeaders(params->url, ¶ms->extra_headers); |
| 242 } | 247 } |
| 243 | 248 |
| 244 int GetSwitchValueAsInt( | 249 int GetSwitchValueAsInt( |
| 245 const CommandLine& command_line, | 250 const CommandLine& command_line, |
| 246 const std::string& switch_string, | 251 const std::string& switch_string, |
| 247 int min_value) { | 252 int min_value) { |
| 248 std::string string_value = command_line.GetSwitchValueASCII(switch_string); | 253 std::string string_value = command_line.GetSwitchValueASCII(switch_string); |
| (...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3131 browser_plugin_host()->embedder_render_process_host(); | 3136 browser_plugin_host()->embedder_render_process_host(); |
| 3132 *embedder_container_id = browser_plugin_host()->instance_id(); | 3137 *embedder_container_id = browser_plugin_host()->instance_id(); |
| 3133 int embedder_process_id = | 3138 int embedder_process_id = |
| 3134 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3139 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3135 if (embedder_process_id != -1) { | 3140 if (embedder_process_id != -1) { |
| 3136 *embedder_channel_name = | 3141 *embedder_channel_name = |
| 3137 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3142 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3138 embedder_process_id); | 3143 embedder_process_id); |
| 3139 } | 3144 } |
| 3140 } | 3145 } |
| OLD | NEW |