pref_names.cc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/variations/pref_names.h"
  5. namespace variations {
  6. namespace prefs {
  7. // Reflects the state of the "DeviceChromeVariations" policy. The policy
  8. // determines if and which variations should be enabled for the client on
  9. // ChromeOS. The possible values are defined in the
  10. // variations::RestrictionPolicy enum.
  11. const char kDeviceVariationsRestrictionsByPolicy[] =
  12. "device_variations_restrictions_by_policy";
  13. // base64-encoded compressed serialized form of the variations seed protobuf.
  14. const char kVariationsCompressedSeed[] = "variations_compressed_seed";
  15. // The latest country code received by the VariationsService for evaluating
  16. // studies.
  17. const char kVariationsCountry[] = "variations_country";
  18. // The number of times that Chrome has crashed before successfully fetching a
  19. // new seed. Used to determine whether to fall back to a "safe" seed.
  20. const char kVariationsCrashStreak[] = "variations_crash_streak";
  21. // The number of times that the VariationsService has failed to fetch a new
  22. // seed. Used to determine whether to fall back to a "safe" seed.
  23. const char kVariationsFailedToFetchSeedStreak[] =
  24. "variations_failed_to_fetch_seed_streak";
  25. // The serialized base::Time from the last successful seed fetch (i.e. when the
  26. // Variations server responds with 200 or 304). This is a client timestamp.
  27. const char kVariationsLastFetchTime[] = "variations_last_fetch_time";
  28. // The milestone, e.g. 96, with which the regular seed was fetched.
  29. const char kVariationsSeedMilestone[] = "variations_seed_milestone";
  30. // Pair of <Chrome version string, country code string> representing the country
  31. // used for filtering permanent consistency studies until the next time Chrome
  32. // is updated.
  33. const char kVariationsPermanentConsistencyCountry[] =
  34. "variations_permanent_consistency_country";
  35. // A country code string representing the country used for filtering permanent
  36. // consistency studies. This is not updated when Chrome is updated, but it can
  37. // be changed via chrome://translate-internals and is intended for testing and
  38. // developer use.
  39. const char kVariationsPermanentOverriddenCountry[] =
  40. "variations_permanent_overridden_country";
  41. // Reflects the state of the "ChromeVariations" policy. The policy determines if
  42. // and which variations should be enabled for the client. The possible values
  43. // are defined in the variations::RestrictionPolicy enum.
  44. const char kVariationsRestrictionsByPolicy[] =
  45. "variations_restrictions_by_policy";
  46. // String for the restrict parameter to be appended to the variations URL.
  47. const char kVariationsRestrictParameter[] = "variations_restrict_parameter";
  48. // The last known "safe" variations seed, stored as the result of compressing
  49. // the base64-encoded serialized form of the variations seed protobuf. Empty if
  50. // there is no known "safe" seed. A seed is deemed "safe" if, while the seed is
  51. // active, it has been observed to be possible to reach the variations server
  52. // and download a new seed. Design doc:
  53. // https://docs.google.com/document/d/17UN2pLSa5JZqk8f3LeYZIftXewxqcITotgalTrJvGSY
  54. const char kVariationsSafeCompressedSeed[] = "variations_safe_compressed_seed";
  55. // The serialized base::Time used for safe seed expiry checks. This is usually
  56. // the time at which the last known "safe" seed was received; however, it could
  57. // be a build timestamp if the received date is unknown. An empty
  58. // (default-constructed) base::Time if there is no known "safe" seed. This is a
  59. // server-provided timestamp.
  60. const char kVariationsSafeSeedDate[] = "variations_safe_seed_date";
  61. // The serialized base::Time from the fetch corresponding to the safe seed, i.e.
  62. // a copy of the last value stored in the |kVariationsLastFetchTime| pref that
  63. // corresponded to the same seed contents as the safe seed. This is a client
  64. // timestamp.
  65. // Note: This pref was added about a milestone after most of the other safe seed
  66. // prefs, so it might be missing for some clients that otherwise have safe seed
  67. // data.
  68. const char kVariationsSafeSeedFetchTime[] = "variations_safe_seed_fetch_time";
  69. // The active client locale that was successfully used in association with the
  70. // last known "safe" seed.
  71. const char kVariationsSafeSeedLocale[] = "variations_safe_seed_locale";
  72. // The milestone with which the "safe" seed was fetched.
  73. const char kVariationsSafeSeedMilestone[] = "variations_safe_seed_milestone";
  74. // A saved copy of |kVariationsPermanentConsistencyCountry|. The saved value is
  75. // the most recent value that was successfully used by the VariationsService for
  76. // evaluating permanent consistency studies.
  77. const char kVariationsSafeSeedPermanentConsistencyCountry[] =
  78. "variations_safe_seed_permanent_consistency_country";
  79. // A saved copy of |kVariationsCountry|. The saved value is the most recent
  80. // value that was successfully used by the VariationsService for evaluating
  81. // session consistency studies.
  82. const char kVariationsSafeSeedSessionConsistencyCountry[] =
  83. "variations_safe_seed_session_consistency_country";
  84. // The digital signature of the last known "safe" variations seed's binary data,
  85. // base64-encoded. Empty if there is no known "safe" seed.
  86. const char kVariationsSafeSeedSignature[] = "variations_safe_seed_signature";
  87. // The serialized base::Time from the last seed received. This is a
  88. // server-provided timestamp.
  89. const char kVariationsSeedDate[] = "variations_seed_date";
  90. // Digital signature of the binary variations seed data, base64-encoded.
  91. const char kVariationsSeedSignature[] = "variations_seed_signature";
  92. } // namespace prefs
  93. } // namespace variations