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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1181493002: [Patch 3 of 6] Split out content/child's SiteIsolationPolicy into two new classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_policy_to_sniffer2
Patch Set: Alex's fixes Created 5 years, 6 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/resource_dispatcher.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 1531
1532 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource( 1532 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource(
1533 const base::string16& source) const { 1533 const base::string16& source) const {
1534 #if defined(ENABLE_EXTENSIONS) 1534 #if defined(ENABLE_EXTENSIONS)
1535 return extensions::IsSourceFromAnExtension(source); 1535 return extensions::IsSourceFromAnExtension(source);
1536 #else 1536 #else
1537 return false; 1537 return false;
1538 #endif 1538 #endif
1539 } 1539 }
1540 1540
1541 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { 1541 bool ChromeContentRendererClient::ShouldGatherSiteIsolationStats() const {
1542 // SiteIsolationPolicy is off by default. We would like to activate cross-site 1542 // Site isolation stats are gathered currently for non-extension renderer
1543 // document blocking (for UMA data collection) for normal renderer processes 1543 // processes running a normal web page from the Internet.
1544 // running a normal web page from the Internet. We only turn on 1544 // TODO(nick): Gather stats for extension processes too.
Charlie Reis 2015/06/16 21:21:51 Let's mention what's blocking this, since I forgot
ncarter (slow) 2015/06/16 22:24:48 Done.
1545 // SiteIsolationPolicy for a renderer process that does not have the extension
1546 // flag on.
1547 #if defined(ENABLE_EXTENSIONS) 1545 #if defined(ENABLE_EXTENSIONS)
1548 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 1546 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
1549 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1547 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1550 #else 1548 #else
1551 return true; 1549 return true;
1552 #endif 1550 #endif
1553 } 1551 }
1554 1552
1555 blink::WebWorkerContentSettingsClientProxy* 1553 blink::WebWorkerContentSettingsClientProxy*
1556 ChromeContentRendererClient::CreateWorkerContentSettingsClientProxy( 1554 ChromeContentRendererClient::CreateWorkerContentSettingsClientProxy(
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 WebString header_key(ASCIIToUTF16( 1646 WebString header_key(ASCIIToUTF16(
1649 data_reduction_proxy::chrome_proxy_header())); 1647 data_reduction_proxy::chrome_proxy_header()));
1650 if (!response.httpHeaderField(header_key).isNull() && 1648 if (!response.httpHeaderField(header_key).isNull() &&
1651 response.httpHeaderField(header_key).utf8().find( 1649 response.httpHeaderField(header_key).utf8().find(
1652 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != 1650 data_reduction_proxy::chrome_proxy_lo_fi_directive()) !=
1653 std::string::npos) { 1651 std::string::npos) {
1654 (*properties)[data_reduction_proxy::chrome_proxy_header()] = 1652 (*properties)[data_reduction_proxy::chrome_proxy_header()] =
1655 data_reduction_proxy::chrome_proxy_lo_fi_directive(); 1653 data_reduction_proxy::chrome_proxy_lo_fi_directive();
1656 } 1654 }
1657 } 1655 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698