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

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

Issue 6966016: Handle <link rel=prerender> in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tone down the over-aggressive search and replace... Created 9 years, 7 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
« no previous file with comments | « content/common/common_param_traits.cc ('k') | net/base/load_flags_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 } 2565 }
2566 2566
2567 if (data_source) { 2567 if (data_source) {
2568 NavigationState* state = NavigationState::FromDataSource(data_source); 2568 NavigationState* state = NavigationState::FromDataSource(data_source);
2569 if (state && state->is_cache_policy_override_set()) 2569 if (state && state->is_cache_policy_override_set())
2570 request.setCachePolicy(state->cache_policy_override()); 2570 request.setCachePolicy(state->cache_policy_override());
2571 } 2571 }
2572 2572
2573 if (top_data_source) { 2573 if (top_data_source) {
2574 NavigationState* state = NavigationState::FromDataSource(top_data_source); 2574 NavigationState* state = NavigationState::FromDataSource(top_data_source);
2575 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) 2575 // TODO(gavinp): separate out prefetching and prerender field trials
2576 // if the rel=prerender rel type is sticking around.
2577 if (state && (request.targetType() == WebURLRequest::TargetIsPrefetch ||
2578 request.targetType() == WebURLRequest::TargetIsPrerender))
2576 state->set_was_prefetcher(true); 2579 state->set_was_prefetcher(true);
2577 } 2580 }
2578 2581
2579 request.setRequestorID(routing_id_); 2582 request.setRequestorID(routing_id_);
2580 request.setHasUserGesture(frame->isProcessingUserGesture()); 2583 request.setHasUserGesture(frame->isProcessingUserGesture());
2581 2584
2582 if (!renderer_preferences_.enable_referrers) 2585 if (!renderer_preferences_.enable_referrers)
2583 request.clearHTTPHeaderField("Referer"); 2586 request.clearHTTPHeaderField("Referer");
2584 2587
2585 // Temporary metrics, see site_isolation_metrics.h 2588 // Temporary metrics, see site_isolation_metrics.h
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
4179 const webkit_glue::CustomContextMenuContext& custom_context) { 4182 const webkit_glue::CustomContextMenuContext& custom_context) {
4180 if (custom_context.is_pepper_menu) 4183 if (custom_context.is_pepper_menu)
4181 pepper_delegate_.OnContextMenuClosed(custom_context); 4184 pepper_delegate_.OnContextMenuClosed(custom_context);
4182 else 4185 else
4183 context_menu_node_.reset(); 4186 context_menu_node_.reset();
4184 } 4187 }
4185 4188
4186 void RenderView::OnNetworkStateChanged(bool online) { 4189 void RenderView::OnNetworkStateChanged(bool online) {
4187 WebNetworkStateNotifier::setOnLine(online); 4190 WebNetworkStateNotifier::setOnLine(online);
4188 } 4191 }
OLDNEW
« no previous file with comments | « content/common/common_param_traits.cc ('k') | net/base/load_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698