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

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

Issue 2009543002: Add storage manager overlay on Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, 484 IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE },
485 { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE }, 485 { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE },
486 { "mouseSpeed", IDS_OPTIONS_SETTINGS_MOUSE_SPEED_DESCRIPTION }, 486 { "mouseSpeed", IDS_OPTIONS_SETTINGS_MOUSE_SPEED_DESCRIPTION },
487 { "noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES }, 487 { "noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES },
488 { "powerSettingsButton", 488 { "powerSettingsButton",
489 IDS_OPTIONS_DEVICE_GROUP_POWER_SETTINGS_BUTTON }, 489 IDS_OPTIONS_DEVICE_GROUP_POWER_SETTINGS_BUTTON },
490 { "resolveTimezoneByGeoLocation", 490 { "resolveTimezoneByGeoLocation",
491 IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION }, 491 IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION },
492 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, 492 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME },
493 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, 493 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL },
494 { "storageManagerButtonTitle",
495 IDS_OPTIONS_DEVICE_GROUP_STORAGE_MANAGER_BUTTON_TITLE },
494 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL }, 496 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL },
495 { "thirdPartyImeConfirmDisable", IDS_CANCEL }, 497 { "thirdPartyImeConfirmDisable", IDS_CANCEL },
496 { "thirdPartyImeConfirmEnable", IDS_OK }, 498 { "thirdPartyImeConfirmEnable", IDS_OK },
497 { "thirdPartyImeConfirmMessage", 499 { "thirdPartyImeConfirmMessage",
498 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_MESSAGE }, 500 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_MESSAGE },
499 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, 501 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION },
500 { "touchpadSpeed", IDS_OPTIONS_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION }, 502 { "touchpadSpeed", IDS_OPTIONS_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION },
501 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, 503 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION },
502 { "wakeOnWifiLabel", IDS_OPTIONS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION }, 504 { "wakeOnWifiLabel", IDS_OPTIONS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION },
503 #else 505 #else
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 base::FeatureList::IsEnabled(features::kOptInImeMenu)); 726 base::FeatureList::IsEnabled(features::kOptInImeMenu));
725 values->SetBoolean( 727 values->SetBoolean(
726 "enableExperimentalAccessibilityFeatures", 728 "enableExperimentalAccessibilityFeatures",
727 base::CommandLine::ForCurrentProcess()->HasSwitch( 729 base::CommandLine::ForCurrentProcess()->HasSwitch(
728 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 730 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
729 731
730 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 732 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
731 bool allow_bluetooth = true; 733 bool allow_bluetooth = true;
732 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 734 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
733 values->SetBoolean("allowBluetooth", allow_bluetooth); 735 values->SetBoolean("allowBluetooth", allow_bluetooth);
736
737 const bool have_enable_storage_manager_switch =
738 base::CommandLine::ForCurrentProcess()->HasSwitch(
739 chromeos::switches::kEnableStorageManager);
740 values->SetBoolean("enableStorageManager",
Dan Beam 2016/05/26 00:10:37 nit: values->SetBoolean("enableStorageManager",
fukino 2016/05/26 04:54:54 Done.
741 have_enable_storage_manager_switch);
734 #endif 742 #endif
735 } 743 }
736 744
737 #if defined(ENABLE_PRINT_PREVIEW) 745 #if defined(ENABLE_PRINT_PREVIEW)
738 void BrowserOptionsHandler::RegisterCloudPrintValues( 746 void BrowserOptionsHandler::RegisterCloudPrintValues(
739 base::DictionaryValue* values) { 747 base::DictionaryValue* values) {
740 values->SetString("cloudPrintOptionLabel", 748 values->SetString("cloudPrintOptionLabel",
741 l10n_util::GetStringFUTF16( 749 l10n_util::GetStringFUTF16(
742 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, 750 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL,
743 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); 751 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT)));
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 2186
2179 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2187 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2180 #if defined(OS_CHROMEOS) 2188 #if defined(OS_CHROMEOS)
2181 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2189 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2182 #else 2190 #else
2183 return true; 2191 return true;
2184 #endif 2192 #endif
2185 } 2193 }
2186 2194
2187 } // namespace options 2195 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698