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

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: Don't allow flag for unknown channel + rebase. 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 VersionInfo::Channel channel = VersionInfo::GetChannel();
1434 if (channel == VersionInfo::CHANNEL_DEV ||
1435 channel == VersionInfo::CHANNEL_CANARY) {
1436 static const char* const kWebRtcDevSwitchNames[] = {
1437 switches::kDisableWebRtcEncryption,
1438 };
1439 command_line->CopySwitchesFrom(browser_command_line,
1440 kWebRtcDevSwitchNames,
1441 arraysize(kWebRtcDevSwitchNames));
1442 }
1443 #endif
1444
1431 content::RenderProcessHost* process = 1445 content::RenderProcessHost* process =
1432 content::RenderProcessHost::FromID(child_process_id); 1446 content::RenderProcessHost::FromID(child_process_id);
1433 if (process) { 1447 if (process) {
1434 Profile* profile = Profile::FromBrowserContext( 1448 Profile* profile = Profile::FromBrowserContext(
1435 process->GetBrowserContext()); 1449 process->GetBrowserContext());
1436 ExtensionService* extension_service = 1450 ExtensionService* extension_service =
1437 extensions::ExtensionSystem::Get(profile)->extension_service(); 1451 extensions::ExtensionSystem::Get(profile)->extension_service();
1438 if (extension_service) { 1452 if (extension_service) {
1439 extensions::ProcessMap* process_map = extension_service->process_map(); 1453 extensions::ProcessMap* process_map = extension_service->process_map();
1440 if (process_map && process_map->Contains(process->GetID())) 1454 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, 2652 return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
2639 allowed_file_handle_origins_) || 2653 allowed_file_handle_origins_) ||
2640 IsHostAllowedByCommandLine(url, extension_set, 2654 IsHostAllowedByCommandLine(url, extension_set,
2641 switches::kAllowNaClFileHandleAPI); 2655 switches::kAllowNaClFileHandleAPI);
2642 #else 2656 #else
2643 return false; 2657 return false;
2644 #endif 2658 #endif
2645 } 2659 }
2646 2660
2647 } // namespace chrome 2661 } // 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