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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Comments Created 8 years, 1 month 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 nav_params.extra_headers = params.extra_headers; 1291 nav_params.extra_headers = params.extra_headers;
1292 nav_params.disposition = params.disposition; 1292 nav_params.disposition = params.disposition;
1293 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; 1293 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE;
1294 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; 1294 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
1295 nav_params.user_gesture = true; 1295 nav_params.user_gesture = true;
1296 nav_params.override_encoding = params.override_encoding; 1296 nav_params.override_encoding = params.override_encoding;
1297 nav_params.is_renderer_initiated = params.is_renderer_initiated; 1297 nav_params.is_renderer_initiated = params.is_renderer_initiated;
1298 nav_params.transferred_global_request_id = 1298 nav_params.transferred_global_request_id =
1299 params.transferred_global_request_id; 1299 params.transferred_global_request_id;
1300 nav_params.is_cross_site_redirect = params.is_cross_site_redirect; 1300 nav_params.is_cross_site_redirect = params.is_cross_site_redirect;
1301
1302 if (params.transition == content::PAGE_TRANSITION_FORM_SUBMIT) {
1303 nav_params.browser_initiated_post_data = params.browser_initiated_post_data;
Charlie Reis 2012/11/20 05:46:03 We used the "browser_initated_post_data" name befo
1304 }
1305
1301 chrome::Navigate(&nav_params); 1306 chrome::Navigate(&nav_params);
1302 1307
1303 return nav_params.target_contents ? 1308 return nav_params.target_contents ?
1304 nav_params.target_contents->web_contents() : NULL; 1309 nav_params.target_contents->web_contents() : NULL;
1305 } 1310 }
1306 1311
1307 void Browser::NavigationStateChanged(const WebContents* source, 1312 void Browser::NavigationStateChanged(const WebContents* source,
1308 unsigned changed_flags) { 1313 unsigned changed_flags) {
1309 // Only update the UI when something visible has changed. 1314 // Only update the UI when something visible has changed.
1310 if (changed_flags) 1315 if (changed_flags)
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 if (contents && !allow_js_access) { 2351 if (contents && !allow_js_access) {
2347 contents->web_contents()->GetController().LoadURL( 2352 contents->web_contents()->GetController().LoadURL(
2348 target_url, 2353 target_url,
2349 content::Referrer(), 2354 content::Referrer(),
2350 content::PAGE_TRANSITION_LINK, 2355 content::PAGE_TRANSITION_LINK,
2351 std::string()); // No extra headers. 2356 std::string()); // No extra headers.
2352 } 2357 }
2353 2358
2354 return contents != NULL; 2359 return contents != NULL;
2355 } 2360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698