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

Side by Side Diff: chromeos/chromeos_switches.cc

Issue 1843523002: ChromeOS: Add SystemTimezoneAutomaticDetection policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@596690--Implement-better-timezone-detection--refactoring-before-policy
Patch Set: Update after review. Created 4 years, 8 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 "chromeos/chromeos_switches.h" 5 #include "chromeos/chromeos_switches.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 9
10 // TODO(rsorokin): alphabetize all of these switches so they 10 // TODO(rsorokin): alphabetize all of these switches so they
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // Forces CrOS region value. 352 // Forces CrOS region value.
353 const char kCrosRegion[] = "cros-region"; 353 const char kCrosRegion[] = "cros-region";
354 354
355 // Controls CrOS GaiaId migration for tests: 355 // Controls CrOS GaiaId migration for tests:
356 // "" - default, 356 // "" - default,
357 // "started" - migration started (i.e. all stored user keys will be converted 357 // "started" - migration started (i.e. all stored user keys will be converted
358 // to GaiaId). 358 // to GaiaId).
359 const char kTestCrosGaiaIdMigration[] = "test-cros-gaia-id-migration"; 359 const char kTestCrosGaiaIdMigration[] = "test-cros-gaia-id-migration";
360 const char kTestCrosGaiaIdMigrationStarted[] = "started"; 360 const char kTestCrosGaiaIdMigrationStarted[] = "started";
361 361
362 // This flag enables SystemTimezoneAutomaticDetection policy.
363 const char kEnableSystemTimezoneAutomaticDetectionPolicy[] =
364 "enable-system-timezone-automatic-detection";
365
362 bool WakeOnWifiEnabled() { 366 bool WakeOnWifiEnabled() {
363 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi); 367 return !base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableWakeOnWifi);
364 } 368 }
365 369
366 bool MemoryPressureHandlingEnabled() { 370 bool MemoryPressureHandlingEnabled() {
367 if (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) == 371 if (base::FieldTrialList::FindFullName(kMemoryPressureExperimentName) ==
368 kMemoryPressureHandlingOff) { 372 kMemoryPressureHandlingOff) {
369 return false; 373 return false;
370 } 374 }
371 return true; 375 return true;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 413 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
410 if (!command_line->HasSwitch(kTestCrosGaiaIdMigration)) 414 if (!command_line->HasSwitch(kTestCrosGaiaIdMigration))
411 return false; 415 return false;
412 416
413 return command_line->GetSwitchValueASCII(kTestCrosGaiaIdMigration) == 417 return command_line->GetSwitchValueASCII(kTestCrosGaiaIdMigration) ==
414 kTestCrosGaiaIdMigrationStarted; 418 kTestCrosGaiaIdMigrationStarted;
415 } 419 }
416 420
417 } // namespace switches 421 } // namespace switches
418 } // namespace chromeos 422 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698