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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 451853003: [Password Manager] Setup experiment to restrict autofilling of sync credential (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change cgi params Created 6 years, 4 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/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 }; 482 };
483 483
484 const Experiment::Choice kEnableDropSyncCredentialChoices[] = { 484 const Experiment::Choice kEnableDropSyncCredentialChoices[] = {
485 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 485 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
486 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 486 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
487 password_manager::switches::kEnableDropSyncCredential, "" }, 487 password_manager::switches::kEnableDropSyncCredential, "" },
488 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 488 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
489 password_manager::switches::kDisableDropSyncCredential, "" }, 489 password_manager::switches::kDisableDropSyncCredential, "" },
490 }; 490 };
491 491
492 const Experiment::Choice kAutofillSyncCredentialChoices[] = {
493 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
494 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL,
495 password_manager::switches::kAllowAutofillSyncCredential, ""},
496 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH,
497 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""},
498 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL,
499 password_manager::switches::kDisallowAutofillSyncCredential, ""},
500 };
501
492 // RECORDING USER METRICS FOR FLAGS: 502 // RECORDING USER METRICS FOR FLAGS:
493 // ----------------------------------------------------------------------------- 503 // -----------------------------------------------------------------------------
494 // The first line of the experiment is the internal name. If you'd like to 504 // The first line of the experiment is the internal name. If you'd like to
495 // gather statistics about the usage of your flag, you should append a marker 505 // gather statistics about the usage of your flag, you should append a marker
496 // comment to the end of the feature name, like so: 506 // comment to the end of the feature name, like so:
497 // "my-special-feature", // FLAGS:RECORD_UMA 507 // "my-special-feature", // FLAGS:RECORD_UMA
498 // 508 //
499 // After doing that, run 509 // After doing that, run
500 // tools/metrics/actions/extract_actions.py 510 // tools/metrics/actions/extract_actions.py
501 // to add the metric to actions.xml (which will enable UMA to record your 511 // to add the metric to actions.xml (which will enable UMA to record your
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, 1925 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION,
1916 kOsAll, 1926 kOsAll,
1917 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) 1927 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices)
1918 }, 1928 },
1919 { 1929 {
1920 "enable-drop-sync-credential", 1930 "enable-drop-sync-credential",
1921 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, 1931 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME,
1922 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, 1932 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION,
1923 kOsAll, 1933 kOsAll,
1924 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) 1934 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices)
1925 } 1935 },
1936 {
1937 "autofill-sync-credential",
1938 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME,
1939 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION,
1940 kOsAll,
1941 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices)
1942 },
1926 }; 1943 };
1927 1944
1928 const Experiment* experiments = kExperiments; 1945 const Experiment* experiments = kExperiments;
1929 size_t num_experiments = arraysize(kExperiments); 1946 size_t num_experiments = arraysize(kExperiments);
1930 1947
1931 // Stores and encapsulates the little state that about:flags has. 1948 // Stores and encapsulates the little state that about:flags has.
1932 class FlagsState { 1949 class FlagsState {
1933 public: 1950 public:
1934 FlagsState() : needs_restart_(false) {} 1951 FlagsState() : needs_restart_(false) {}
1935 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, 1952 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 } 2461 }
2445 2462
2446 const Experiment* GetExperiments(size_t* count) { 2463 const Experiment* GetExperiments(size_t* count) {
2447 *count = num_experiments; 2464 *count = num_experiments;
2448 return experiments; 2465 return experiments;
2449 } 2466 }
2450 2467
2451 } // namespace testing 2468 } // namespace testing
2452 2469
2453 } // namespace about_flags 2470 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698