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

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

Issue 2919223002: [Cleanup] Remove the obsolete variations_seed pref. (Closed)
Patch Set: Fix the test Created 3 years, 6 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 } 1140 }
1141 1141
1142 // TODO(macourteau): refactor preferences that are copied from 1142 // TODO(macourteau): refactor preferences that are copied from
1143 // master_preferences into local_state, as a "local_state" section in 1143 // master_preferences into local_state, as a "local_state" section in
1144 // master preferences. If possible, a generic solution would be preferred 1144 // master preferences. If possible, a generic solution would be preferred
1145 // over a copy one-by-one of specific preferences. Also see related TODO 1145 // over a copy one-by-one of specific preferences. Also see related TODO
1146 // in first_run.h. 1146 // in first_run.h.
1147 1147
1148 // Store the initial VariationsService seed in local state, if it exists 1148 // Store the initial VariationsService seed in local state, if it exists
1149 // in master prefs. 1149 // in master prefs.
1150 if (!master_prefs_->variations_seed.empty() || 1150 if (!master_prefs_->compressed_variations_seed.empty()) {
1151 !master_prefs_->compressed_variations_seed.empty()) { 1151 local_state_->SetString(variations::prefs::kVariationsCompressedSeed,
1152 if (!master_prefs_->variations_seed.empty()) { 1152 master_prefs_->compressed_variations_seed);
1153 local_state_->SetString(variations::prefs::kVariationsSeed,
1154 master_prefs_->variations_seed);
1155 }
1156 if (!master_prefs_->compressed_variations_seed.empty()) {
1157 local_state_->SetString(variations::prefs::kVariationsCompressedSeed,
1158 master_prefs_->compressed_variations_seed);
1159 }
1160 if (!master_prefs_->variations_seed_signature.empty()) { 1153 if (!master_prefs_->variations_seed_signature.empty()) {
1161 local_state_->SetString(variations::prefs::kVariationsSeedSignature, 1154 local_state_->SetString(variations::prefs::kVariationsSeedSignature,
1162 master_prefs_->variations_seed_signature); 1155 master_prefs_->variations_seed_signature);
1163 } 1156 }
1164 // Set the variation seed date to the current system time. If the user's 1157 // Set the variation seed date to the current system time. If the user's
1165 // clock is incorrect, this may cause some field trial expiry checks to 1158 // clock is incorrect, this may cause some field trial expiry checks to
1166 // not do the right thing until the next seed update from the server, 1159 // not do the right thing until the next seed update from the server,
1167 // when this value will be updated. 1160 // when this value will be updated.
1168 local_state_->SetInt64(variations::prefs::kVariationsSeedDate, 1161 local_state_->SetInt64(variations::prefs::kVariationsSeedDate,
1169 base::Time::Now().ToInternalValue()); 1162 base::Time::Now().ToInternalValue());
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 chromeos::CrosSettings::Shutdown(); 2060 chromeos::CrosSettings::Shutdown();
2068 #endif // defined(OS_CHROMEOS) 2061 #endif // defined(OS_CHROMEOS)
2069 #endif // defined(OS_ANDROID) 2062 #endif // defined(OS_ANDROID)
2070 } 2063 }
2071 2064
2072 // Public members: 2065 // Public members:
2073 2066
2074 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2067 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2075 chrome_extra_parts_.push_back(parts); 2068 chrome_extra_parts_.push_back(parts);
2076 } 2069 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | components/variations/variations_seed_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698