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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1391583002: Introduce "navigate" mode in Requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 4907 matching lines...) Expand 10 before | Expand all | Expand 10 after
4918 provisional_data_source ? provisional_data_source : current_data_source; 4918 provisional_data_source ? provisional_data_source : current_data_source;
4919 4919
4920 // The current entry can only be replaced if there already is an entry in the 4920 // The current entry can only be replaced if there already is an entry in the
4921 // history list. 4921 // history list.
4922 if (data_source && render_view_->history_list_length_ > 0) { 4922 if (data_source && render_view_->history_list_length_ > 0) {
4923 should_replace_current_entry = data_source->replacesCurrentHistoryItem(); 4923 should_replace_current_entry = data_source->replacesCurrentHistoryItem();
4924 } 4924 }
4925 4925
4926 // These values are assumed on the browser side for navigations. These checks 4926 // These values are assumed on the browser side for navigations. These checks
4927 // ensure the renderer has the correct values. 4927 // ensure the renderer has the correct values.
4928 DCHECK_EQ(FETCH_REQUEST_MODE_SAME_ORIGIN, 4928 DCHECK_EQ(FETCH_REQUEST_MODE_NAVIGATE,
4929 GetFetchRequestModeForWebURLRequest(*request)); 4929 GetFetchRequestModeForWebURLRequest(*request));
4930 DCHECK_EQ(FETCH_CREDENTIALS_MODE_INCLUDE, 4930 DCHECK_EQ(FETCH_CREDENTIALS_MODE_INCLUDE,
4931 GetFetchCredentialsModeForWebURLRequest(*request)); 4931 GetFetchCredentialsModeForWebURLRequest(*request));
4932 DCHECK(GetFetchRedirectModeForWebURLRequest(*request) == 4932 DCHECK(GetFetchRedirectModeForWebURLRequest(*request) ==
4933 FetchRedirectMode::MANUAL_MODE); 4933 FetchRedirectMode::MANUAL_MODE);
4934 DCHECK_IMPLIES(!frame_->parent(), 4934 DCHECK_IMPLIES(!frame_->parent(),
4935 GetRequestContextFrameTypeForWebURLRequest(*request) == 4935 GetRequestContextFrameTypeForWebURLRequest(*request) ==
4936 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); 4936 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
4937 DCHECK_IMPLIES(frame_->parent(), 4937 DCHECK_IMPLIES(frame_->parent(),
4938 GetRequestContextFrameTypeForWebURLRequest(*request) == 4938 GetRequestContextFrameTypeForWebURLRequest(*request) ==
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
5210 mojo::ServiceProviderPtr service_provider(21); 5210 mojo::ServiceProviderPtr service_provider(21);
5211 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5211 mojo::URLRequestPtr request(mojo::URLRequest::New());
5212 request->url = mojo::String::From(url); 5212 request->url = mojo::String::From(url);
5213 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5213 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5214 nullptr, nullptr, 5214 nullptr, nullptr,
5215 base::Bind(&OnGotContentHandlerID)); 5215 base::Bind(&OnGotContentHandlerID));
5216 return service_provider.Pass(); 5216 return service_provider.Pass();
5217 } 5217 }
5218 5218
5219 } // namespace content 5219 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698