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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc

Issue 10810073: [cros] Flip enable-html5-camera switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indentation fixes Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc
index d2aad4c309cf8083a41583d64b01965b27c27d99..c5607c72bd65a28043478cd5619c7eafb6dde070 100644
--- a/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler.cc
@@ -101,10 +101,12 @@ void ChangePictureOptionsHandler::GetLocalizedValues(
IDS_OPTIONS_CHANGE_PICTURE_PROFILE_LOADING_PHOTO));
localized_strings->SetString("previewAltText",
l10n_util::GetStringUTF16(IDS_OPTIONS_CHANGE_PICTURE_PREVIEW_ALT));
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHtml5Camera))
+ if (!CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableHtml5Camera)) {
localized_strings->SetString("cameraType", "webrtc");
- else
+ } else {
localized_strings->SetString("cameraType", "old");
+ }
}
void ChangePictureOptionsHandler::RegisterMessages() {
@@ -196,8 +198,8 @@ void ChangePictureOptionsHandler::HandlePageInitialized(
const base::ListValue* args) {
DCHECK(args && args->empty());
- if (!CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kEnableHtml5Camera)) {
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableHtml5Camera)) {
// If no camera presence check has been performed in this session,
// start one now.
if (CameraDetector::camera_presence() ==
@@ -365,8 +367,10 @@ void ChangePictureOptionsHandler::OnPhotoAccepted(const gfx::ImageSkia& photo) {
void ChangePictureOptionsHandler::CheckCameraPresence() {
// For WebRTC, camera presence checked is done on JS side.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHtml5Camera))
+ if (!CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableHtml5Camera)) {
return;
+ }
CameraDetector::StartPresenceCheck(
base::Bind(&ChangePictureOptionsHandler::OnCameraPresenceCheckDone,
weak_factory_.GetWeakPtr()));
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698