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

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 FileRead Permission Created 8 years, 2 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 "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 // OS_WIN 10 #endif // OS_WIN
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 nav_params.referrer = params.referrer; 1287 nav_params.referrer = params.referrer;
1288 nav_params.extra_headers = params.extra_headers; 1288 nav_params.extra_headers = params.extra_headers;
1289 nav_params.disposition = params.disposition; 1289 nav_params.disposition = params.disposition;
1290 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; 1290 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE;
1291 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; 1291 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
1292 nav_params.user_gesture = true; 1292 nav_params.user_gesture = true;
1293 nav_params.override_encoding = params.override_encoding; 1293 nav_params.override_encoding = params.override_encoding;
1294 nav_params.is_renderer_initiated = params.is_renderer_initiated; 1294 nav_params.is_renderer_initiated = params.is_renderer_initiated;
1295 nav_params.transferred_global_request_id = 1295 nav_params.transferred_global_request_id =
1296 params.transferred_global_request_id; 1296 params.transferred_global_request_id;
1297 // set post data
1298 if (params.transition == content::PAGE_TRANSITION_FORM_SUBMIT) {
1299 nav_params.post_data = params.post_data;
1300 }
1301
1297 chrome::Navigate(&nav_params); 1302 chrome::Navigate(&nav_params);
1298 1303
1299 return nav_params.target_contents ? 1304 return nav_params.target_contents ?
1300 nav_params.target_contents->web_contents() : NULL; 1305 nav_params.target_contents->web_contents() : NULL;
1301 } 1306 }
1302 1307
1303 void Browser::NavigationStateChanged(const WebContents* source, 1308 void Browser::NavigationStateChanged(const WebContents* source,
1304 unsigned changed_flags) { 1309 unsigned changed_flags) {
1305 // Only update the UI when something visible has changed. 1310 // Only update the UI when something visible has changed.
1306 if (changed_flags) 1311 if (changed_flags)
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 if (contents && !allow_js_access) { 2318 if (contents && !allow_js_access) {
2314 contents->web_contents()->GetController().LoadURL( 2319 contents->web_contents()->GetController().LoadURL(
2315 target_url, 2320 target_url,
2316 content::Referrer(), 2321 content::Referrer(),
2317 content::PAGE_TRANSITION_LINK, 2322 content::PAGE_TRANSITION_LINK,
2318 std::string()); // No extra headers. 2323 std::string()); // No extra headers.
2319 } 2324 }
2320 2325
2321 return contents != NULL; 2326 return contents != NULL;
2322 } 2327 }
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