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

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

Issue 23484019: Refactor KeySystems code to call a function to populate the info. (relanding r221932) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build error (cannot |= an enum) Created 7 years, 3 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 | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/content_renderer.gypi » ('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/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1293 }
1294 // Allow access for tests. 1294 // Allow access for tests.
1295 if (CommandLine::ForCurrentProcess()->HasSwitch( 1295 if (CommandLine::ForCurrentProcess()->HasSwitch(
1296 switches::kEnablePepperTesting)) { 1296 switches::kEnablePepperTesting)) {
1297 return true; 1297 return true;
1298 } 1298 }
1299 #endif // !defined(OS_ANDROID) 1299 #endif // !defined(OS_ANDROID)
1300 return false; 1300 return false;
1301 } 1301 }
1302 1302
1303 void ChromeContentRendererClient::AddKeySystems(
1304 std::vector<content::KeySystemInfo>* key_systems) {
1305 // TODO(ddorwin): In the next CL, move code from
1306 // content/renderer/media/crypto/key_systems_info.cc to chrome_key_systems.cc
1307 // and call AddKeySystems.
1308 }
1309
1303 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource( 1310 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource(
1304 const base::string16& source) const { 1311 const base::string16& source) const {
1305 return extensions::IsSourceFromAnExtension(source); 1312 return extensions::IsSourceFromAnExtension(source);
1306 } 1313 }
1307 1314
1308 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { 1315 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
1309 // SiteIsolationPolicy is off by default. We would like to activate cross-site 1316 // SiteIsolationPolicy is off by default. We would like to activate cross-site
1310 // document blocking (for UMA data collection) for normal renderer processes 1317 // document blocking (for UMA data collection) for normal renderer processes
1311 // running a normal web page from the Internet. We only turn on 1318 // running a normal web page from the Internet. We only turn on
1312 // SiteIsolationPolicy for a renderer process that does not have the extension 1319 // SiteIsolationPolicy for a renderer process that does not have the extension
1313 // flag on. 1320 // flag on.
1314 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1321 CommandLine* command_line = CommandLine::ForCurrentProcess();
1315 return !command_line->HasSwitch(switches::kExtensionProcess); 1322 return !command_line->HasSwitch(switches::kExtensionProcess);
1316 } 1323 }
1317 1324
1318 } // namespace chrome 1325 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698