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

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, 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
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 5028 matching lines...) Expand 10 before | Expand all | Expand 10 after
5039 provisional_data_source ? provisional_data_source : current_data_source; 5039 provisional_data_source ? provisional_data_source : current_data_source;
5040 5040
5041 // The current entry can only be replaced if there already is an entry in the 5041 // The current entry can only be replaced if there already is an entry in the
5042 // history list. 5042 // history list.
5043 if (data_source && render_view_->history_list_length_ > 0) { 5043 if (data_source && render_view_->history_list_length_ > 0) {
5044 should_replace_current_entry = data_source->replacesCurrentHistoryItem(); 5044 should_replace_current_entry = data_source->replacesCurrentHistoryItem();
5045 } 5045 }
5046 5046
5047 // These values are assumed on the browser side for navigations. These checks 5047 // These values are assumed on the browser side for navigations. These checks
5048 // ensure the renderer has the correct values. 5048 // ensure the renderer has the correct values.
5049 DCHECK_EQ(FETCH_REQUEST_MODE_SAME_ORIGIN, 5049 DCHECK_EQ(FETCH_REQUEST_MODE_NAVIGATE,
5050 GetFetchRequestModeForWebURLRequest(*request)); 5050 GetFetchRequestModeForWebURLRequest(*request));
5051 DCHECK_EQ(FETCH_CREDENTIALS_MODE_INCLUDE, 5051 DCHECK_EQ(FETCH_CREDENTIALS_MODE_INCLUDE,
5052 GetFetchCredentialsModeForWebURLRequest(*request)); 5052 GetFetchCredentialsModeForWebURLRequest(*request));
5053 DCHECK(GetFetchRedirectModeForWebURLRequest(*request) == 5053 DCHECK(GetFetchRedirectModeForWebURLRequest(*request) ==
5054 FetchRedirectMode::MANUAL_MODE); 5054 FetchRedirectMode::MANUAL_MODE);
5055 DCHECK(frame_->parent() || 5055 DCHECK(frame_->parent() ||
5056 GetRequestContextFrameTypeForWebURLRequest(*request) == 5056 GetRequestContextFrameTypeForWebURLRequest(*request) ==
5057 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL); 5057 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
5058 DCHECK(!frame_->parent() || 5058 DCHECK(!frame_->parent() ||
5059 GetRequestContextFrameTypeForWebURLRequest(*request) == 5059 GetRequestContextFrameTypeForWebURLRequest(*request) ==
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
5352 mojo::ServiceProviderPtr service_provider; 5352 mojo::ServiceProviderPtr service_provider;
5353 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5353 mojo::URLRequestPtr request(mojo::URLRequest::New());
5354 request->url = mojo::String::From(url); 5354 request->url = mojo::String::From(url);
5355 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5355 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5356 nullptr, nullptr, 5356 nullptr, nullptr,
5357 base::Bind(&OnGotContentHandlerID)); 5357 base::Bind(&OnGotContentHandlerID));
5358 return service_provider.Pass(); 5358 return service_provider.Pass();
5359 } 5359 }
5360 5360
5361 } // namespace content 5361 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698