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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 696583002: [Smart Lock] Add a setting to require close proximity in order for unlocking to work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more indentation Created 6 years, 1 month 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/browser/signin/easy_unlock_service.cc ('k') | chrome/common/pref_names.h » ('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/browser/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "chrome/common/chrome_constants.h" 63 #include "chrome/common/chrome_constants.h"
64 #include "chrome/common/chrome_paths.h" 64 #include "chrome/common/chrome_paths.h"
65 #include "chrome/common/chrome_switches.h" 65 #include "chrome/common/chrome_switches.h"
66 #include "chrome/common/extensions/extension_constants.h" 66 #include "chrome/common/extensions/extension_constants.h"
67 #include "chrome/common/pref_names.h" 67 #include "chrome/common/pref_names.h"
68 #include "chrome/common/url_constants.h" 68 #include "chrome/common/url_constants.h"
69 #include "chrome/grit/chromium_strings.h" 69 #include "chrome/grit/chromium_strings.h"
70 #include "chrome/grit/generated_resources.h" 70 #include "chrome/grit/generated_resources.h"
71 #include "chrome/grit/locale_settings.h" 71 #include "chrome/grit/locale_settings.h"
72 #include "chromeos/chromeos_switches.h" 72 #include "chromeos/chromeos_switches.h"
73 #include "components/proximity_auth/switches.h"
73 #include "components/search_engines/template_url.h" 74 #include "components/search_engines/template_url.h"
74 #include "components/search_engines/template_url_service.h" 75 #include "components/search_engines/template_url_service.h"
75 #include "components/signin/core/browser/signin_manager.h" 76 #include "components/signin/core/browser/signin_manager.h"
76 #include "components/signin/core/common/profile_management_switches.h" 77 #include "components/signin/core/common/profile_management_switches.h"
77 #include "components/user_manager/user_type.h" 78 #include "components/user_manager/user_type.h"
78 #include "content/public/browser/browser_thread.h" 79 #include "content/public/browser/browser_thread.h"
79 #include "content/public/browser/download_manager.h" 80 #include "content/public/browser/download_manager.h"
80 #include "content/public/browser/navigation_controller.h" 81 #include "content/public/browser/navigation_controller.h"
81 #include "content/public/browser/notification_details.h" 82 #include "content/public/browser/notification_details.h"
82 #include "content/public/browser/notification_service.h" 83 #include "content/public/browser/notification_service.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION }, 246 IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION },
246 { "downloadLocationBrowseTitle", 247 { "downloadLocationBrowseTitle",
247 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE }, 248 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE },
248 { "downloadLocationChangeButton", 249 { "downloadLocationChangeButton",
249 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON }, 250 IDS_OPTIONS_DOWNLOADLOCATION_CHANGE_BUTTON },
250 { "downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME }, 251 { "downloadLocationGroupName", IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME },
251 { "enableLogging", IDS_OPTIONS_ENABLE_LOGGING }, 252 { "enableLogging", IDS_OPTIONS_ENABLE_LOGGING },
252 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART }, 253 { "metricsReportingResetRestart", IDS_OPTIONS_ENABLE_LOGGING_RESTART },
253 { "easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION, 254 { "easyUnlockDescription", IDS_OPTIONS_EASY_UNLOCK_DESCRIPTION,
254 device_type_resource_id }, 255 device_type_resource_id },
256 { "easyUnlockRequireProximityLabel",
257 IDS_OPTIONS_EASY_UNLOCK_REQUIRE_PROXIMITY_LABEL,
258 device_type_resource_id },
255 { "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE }, 259 { "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE },
256 { "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON }, 260 { "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON },
257 { "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO, 261 { "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO,
258 device_type_resource_id }, 262 device_type_resource_id },
259 { "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED }, 263 { "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED },
260 { "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE }, 264 { "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE },
261 { "fontSettingsCustomizeFontsButton", 265 { "fontSettingsCustomizeFontsButton",
262 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON }, 266 IDS_OPTIONS_FONTSETTINGS_CUSTOMIZE_FONTS_BUTTON },
263 { "fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM }, 267 { "fontSizeLabelCustom", IDS_OPTIONS_FONT_SIZE_LABEL_CUSTOM },
264 { "fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE }, 268 { "fontSizeLabelLarge", IDS_OPTIONS_FONT_SIZE_LABEL_LARGE },
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 620
617 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL); 621 values->SetString("cloudPrintLearnMoreURL", chrome::kCloudPrintLearnMoreURL);
618 622
619 values->SetString("languagesLearnMoreURL", 623 values->SetString("languagesLearnMoreURL",
620 chrome::kLanguageSettingsLearnMoreUrl); 624 chrome::kLanguageSettingsLearnMoreUrl);
621 625
622 values->SetBoolean( 626 values->SetBoolean(
623 "easyUnlockAllowed", 627 "easyUnlockAllowed",
624 EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->IsAllowed()); 628 EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->IsAllowed());
625 values->SetString("easyUnlockLearnMoreURL", chrome::kEasyUnlockLearnMoreUrl); 629 values->SetString("easyUnlockLearnMoreURL", chrome::kEasyUnlockLearnMoreUrl);
630 values->SetBoolean(
631 "easyUnlockProximityDetectionAllowed",
632 CommandLine::ForCurrentProcess()->HasSwitch(
633 proximity_auth::switches::kEnableProximityDetection));
626 634
627 #if defined(OS_CHROMEOS) 635 #if defined(OS_CHROMEOS)
628 values->SetBoolean( 636 values->SetBoolean(
629 "consumerManagementEnabled", 637 "consumerManagementEnabled",
630 CommandLine::ForCurrentProcess()->HasSwitch( 638 CommandLine::ForCurrentProcess()->HasSwitch(
631 chromeos::switches::kEnableConsumerManagement)); 639 chromeos::switches::kEnableConsumerManagement));
632 640
633 RegisterTitle(values, "thirdPartyImeConfirmOverlay", 641 RegisterTitle(values, "thirdPartyImeConfirmOverlay",
634 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); 642 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE);
635 #endif 643 #endif
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 1997
1990 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, 1998 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked,
1991 bool disabled) { 1999 bool disabled) {
1992 web_ui()->CallJavascriptFunction( 2000 web_ui()->CallJavascriptFunction(
1993 "BrowserOptions.setMetricsReportingCheckboxState", 2001 "BrowserOptions.setMetricsReportingCheckboxState",
1994 base::FundamentalValue(checked), 2002 base::FundamentalValue(checked),
1995 base::FundamentalValue(disabled)); 2003 base::FundamentalValue(disabled));
1996 } 2004 }
1997 2005
1998 } // namespace options 2006 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698