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

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: add comment 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
« chrome/browser/io_thread.h ('K') | « 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 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 3211
3212 if (top_data_source) { 3212 if (top_data_source) {
3213 NavigationState* state = NavigationState::FromDataSource(top_data_source); 3213 NavigationState* state = NavigationState::FromDataSource(top_data_source);
3214 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) 3214 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch)
3215 state->set_was_prefetcher(true); 3215 state->set_was_prefetcher(true);
3216 } 3216 }
3217 3217
3218 request.setRequestorID(routing_id_); 3218 request.setRequestorID(routing_id_);
3219 request.setHasUserGesture(frame->isProcessingUserGesture()); 3219 request.setHasUserGesture(frame->isProcessingUserGesture());
3220 3220
3221 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) 3221 if (!renderer_preferences_.enable_referrers)
3222 request.clearHTTPHeaderField("Referer"); 3222 request.clearHTTPHeaderField("Referer");
3223 3223
3224 // Temporary metrics, see site_isolation_metrics.h 3224 // Temporary metrics, see site_isolation_metrics.h
3225 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); 3225 SiteIsolationMetrics::AddRequest(identifier, request.targetType());
3226 } 3226 }
3227 3227
3228 void RenderView::didReceiveResponse( 3228 void RenderView::didReceiveResponse(
3229 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { 3229 WebFrame* frame, unsigned identifier, const WebURLResponse& response) {
3230 3230
3231 // Temporary metrics, see site_isolation_metrics.h 3231 // Temporary metrics, see site_isolation_metrics.h
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 const webkit_glue::CustomContextMenuContext& custom_context) { 5042 const webkit_glue::CustomContextMenuContext& custom_context) {
5043 if (custom_context.is_pepper_menu) 5043 if (custom_context.is_pepper_menu)
5044 pepper_delegate_.OnContextMenuClosed(custom_context); 5044 pepper_delegate_.OnContextMenuClosed(custom_context);
5045 else 5045 else
5046 context_menu_node_.reset(); 5046 context_menu_node_.reset();
5047 } 5047 }
5048 5048
5049 void RenderView::OnNetworkStateChanged(bool online) { 5049 void RenderView::OnNetworkStateChanged(bool online) {
5050 WebNetworkStateNotifier::setOnLine(online); 5050 WebNetworkStateNotifier::setOnLine(online);
5051 } 5051 }
OLDNEW
« chrome/browser/io_thread.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698