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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 37253002: Add command line flag --disable-webrtc-encryption for dev and canary channels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating how the disable information is passed to PeerConnection. Created 7 years, 2 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
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/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "chrome/browser/ui/chrome_select_file_policy.h" 86 #include "chrome/browser/ui/chrome_select_file_policy.h"
87 #include "chrome/browser/ui/sync/sync_promo_ui.h" 87 #include "chrome/browser/ui/sync/sync_promo_ui.h"
88 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 88 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
89 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 89 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
90 #include "chrome/browser/user_style_sheet_watcher.h" 90 #include "chrome/browser/user_style_sheet_watcher.h"
91 #include "chrome/browser/user_style_sheet_watcher_factory.h" 91 #include "chrome/browser/user_style_sheet_watcher_factory.h"
92 #include "chrome/browser/validation_message_message_filter.h" 92 #include "chrome/browser/validation_message_message_filter.h"
93 #include "chrome/common/chrome_constants.h" 93 #include "chrome/common/chrome_constants.h"
94 #include "chrome/common/chrome_paths.h" 94 #include "chrome/common/chrome_paths.h"
95 #include "chrome/common/chrome_switches.h" 95 #include "chrome/common/chrome_switches.h"
96 #include "chrome/common/chrome_version_info.h"
96 #include "chrome/common/env_vars.h" 97 #include "chrome/common/env_vars.h"
97 #include "chrome/common/extensions/background_info.h" 98 #include "chrome/common/extensions/background_info.h"
98 #include "chrome/common/extensions/extension.h" 99 #include "chrome/common/extensions/extension.h"
99 #include "chrome/common/extensions/extension_process_policy.h" 100 #include "chrome/common/extensions/extension_process_policy.h"
100 #include "chrome/common/extensions/extension_set.h" 101 #include "chrome/common/extensions/extension_set.h"
101 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" 102 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h"
102 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" 103 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h"
103 #include "chrome/common/extensions/permissions/permissions_data.h" 104 #include "chrome/common/extensions/permissions/permissions_data.h"
104 #include "chrome/common/extensions/permissions/socket_permission.h" 105 #include "chrome/common/extensions/permissions/socket_permission.h"
105 #include "chrome/common/extensions/web_accessible_resources_handler.h" 106 #include "chrome/common/extensions/web_accessible_resources_handler.h"
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 if (process_type == switches::kRendererProcess) { 1422 if (process_type == switches::kRendererProcess) {
1422 #if defined(OS_CHROMEOS) 1423 #if defined(OS_CHROMEOS)
1423 const std::string& login_profile = 1424 const std::string& login_profile =
1424 browser_command_line.GetSwitchValueASCII( 1425 browser_command_line.GetSwitchValueASCII(
1425 chromeos::switches::kLoginProfile); 1426 chromeos::switches::kLoginProfile);
1426 if (!login_profile.empty()) 1427 if (!login_profile.empty())
1427 command_line->AppendSwitchASCII( 1428 command_line->AppendSwitchASCII(
1428 chromeos::switches::kLoginProfile, login_profile); 1429 chromeos::switches::kLoginProfile, login_profile);
1429 #endif 1430 #endif
1430 1431
1432 #if defined(ENABLE_WEBRTC)
1433 if (VersionInfo::GetChannel() <= VersionInfo::CHANNEL_DEV) {
1434 static const char* const kWebRtcDevSwitchNames[] = {
1435 switches::kDisableWebRtcEncryption,
1436 };
1437 command_line->CopySwitchesFrom(browser_command_line,
sky 2013/10/28 14:10:22 Can you simplify to AppendSwitch?
Henrik Grunell 2013/10/28 15:06:57 Yes after checking with browser_command_line->HasS
sky 2013/10/28 19:49:15 You're right, this is fine.
1438 kWebRtcDevSwitchNames,
1439 arraysize(kWebRtcDevSwitchNames));
1440 }
1441 #endif
1442
1431 content::RenderProcessHost* process = 1443 content::RenderProcessHost* process =
1432 content::RenderProcessHost::FromID(child_process_id); 1444 content::RenderProcessHost::FromID(child_process_id);
1433 if (process) { 1445 if (process) {
1434 Profile* profile = Profile::FromBrowserContext( 1446 Profile* profile = Profile::FromBrowserContext(
1435 process->GetBrowserContext()); 1447 process->GetBrowserContext());
1436 ExtensionService* extension_service = 1448 ExtensionService* extension_service =
1437 extensions::ExtensionSystem::Get(profile)->extension_service(); 1449 extensions::ExtensionSystem::Get(profile)->extension_service();
1438 if (extension_service) { 1450 if (extension_service) {
1439 extensions::ProcessMap* process_map = extension_service->process_map(); 1451 extensions::ProcessMap* process_map = extension_service->process_map();
1440 if (process_map && process_map->Contains(process->GetID())) 1452 if (process_map && process_map->Contains(process->GetID()))
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, 2650 return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
2639 allowed_file_handle_origins_) || 2651 allowed_file_handle_origins_) ||
2640 IsHostAllowedByCommandLine(url, extension_set, 2652 IsHostAllowedByCommandLine(url, extension_set,
2641 switches::kAllowNaClFileHandleAPI); 2653 switches::kAllowNaClFileHandleAPI);
2642 #else 2654 #else
2643 return false; 2655 return false;
2644 #endif 2656 #endif
2645 } 2657 }
2646 2658
2647 } // namespace chrome 2659 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | content/public/common/content_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698