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

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 Structure and Tests 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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 nav_params.referrer = params.referrer; 1285 nav_params.referrer = params.referrer;
1286 nav_params.extra_headers = params.extra_headers; 1286 nav_params.extra_headers = params.extra_headers;
1287 nav_params.disposition = params.disposition; 1287 nav_params.disposition = params.disposition;
1288 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; 1288 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE;
1289 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; 1289 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
1290 nav_params.user_gesture = true; 1290 nav_params.user_gesture = true;
1291 nav_params.override_encoding = params.override_encoding; 1291 nav_params.override_encoding = params.override_encoding;
1292 nav_params.is_renderer_initiated = params.is_renderer_initiated; 1292 nav_params.is_renderer_initiated = params.is_renderer_initiated;
1293 nav_params.transferred_global_request_id = 1293 nav_params.transferred_global_request_id =
1294 params.transferred_global_request_id; 1294 params.transferred_global_request_id;
1295 // set post data
1296 if (params.transition == content::PAGE_TRANSITION_FORM_SUBMIT) {
1297 nav_params.browser_initiated_post_data = params.browser_initiated_post_data;
1298 }
1299
1295 chrome::Navigate(&nav_params); 1300 chrome::Navigate(&nav_params);
1296 1301
1297 return nav_params.target_contents ? 1302 return nav_params.target_contents ?
1298 nav_params.target_contents->web_contents() : NULL; 1303 nav_params.target_contents->web_contents() : NULL;
1299 } 1304 }
1300 1305
1301 void Browser::NavigationStateChanged(const WebContents* source, 1306 void Browser::NavigationStateChanged(const WebContents* source,
1302 unsigned changed_flags) { 1307 unsigned changed_flags) {
1303 // Only update the UI when something visible has changed. 1308 // Only update the UI when something visible has changed.
1304 if (changed_flags) 1309 if (changed_flags)
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 if (contents && !allow_js_access) { 2354 if (contents && !allow_js_access) {
2350 contents->web_contents()->GetController().LoadURL( 2355 contents->web_contents()->GetController().LoadURL(
2351 target_url, 2356 target_url,
2352 content::Referrer(), 2357 content::Referrer(),
2353 content::PAGE_TRANSITION_LINK, 2358 content::PAGE_TRANSITION_LINK,
2354 std::string()); // No extra headers. 2359 std::string()); // No extra headers.
2355 } 2360 }
2356 2361
2357 return contents != NULL; 2362 return contents != NULL;
2358 } 2363 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_navigator.h » ('j') | chrome/browser/ui/browser_navigator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698