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

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

Issue 6773006: Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 8 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/view_messages.h ('k') | no next file » | 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 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 2978
2979 if (top_data_source) { 2979 if (top_data_source) {
2980 NavigationState* state = NavigationState::FromDataSource(top_data_source); 2980 NavigationState* state = NavigationState::FromDataSource(top_data_source);
2981 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) 2981 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch)
2982 state->set_was_prefetcher(true); 2982 state->set_was_prefetcher(true);
2983 } 2983 }
2984 2984
2985 request.setRequestorID(routing_id_); 2985 request.setRequestorID(routing_id_);
2986 request.setHasUserGesture(frame->isProcessingUserGesture()); 2986 request.setHasUserGesture(frame->isProcessingUserGesture());
2987 2987
2988 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) 2988 if (!renderer_preferences_.enable_referrers)
2989 request.clearHTTPHeaderField("Referer"); 2989 request.clearHTTPHeaderField("Referer");
2990 2990
2991 // Temporary metrics, see site_isolation_metrics.h 2991 // Temporary metrics, see site_isolation_metrics.h
2992 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); 2992 SiteIsolationMetrics::AddRequest(identifier, request.targetType());
2993 } 2993 }
2994 2994
2995 void RenderView::didReceiveResponse( 2995 void RenderView::didReceiveResponse(
2996 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { 2996 WebFrame* frame, unsigned identifier, const WebURLResponse& response) {
2997 2997
2998 // Temporary metrics, see site_isolation_metrics.h 2998 // Temporary metrics, see site_isolation_metrics.h
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
4845 const webkit_glue::CustomContextMenuContext& custom_context) { 4845 const webkit_glue::CustomContextMenuContext& custom_context) {
4846 if (custom_context.is_pepper_menu) 4846 if (custom_context.is_pepper_menu)
4847 pepper_delegate_.OnContextMenuClosed(custom_context); 4847 pepper_delegate_.OnContextMenuClosed(custom_context);
4848 else 4848 else
4849 context_menu_node_.reset(); 4849 context_menu_node_.reset();
4850 } 4850 }
4851 4851
4852 void RenderView::OnNetworkStateChanged(bool online) { 4852 void RenderView::OnNetworkStateChanged(bool online) {
4853 WebNetworkStateNotifier::setOnLine(online); 4853 WebNetworkStateNotifier::setOnLine(online);
4854 } 4854 }
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698