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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 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 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
6 6
7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h"
7 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
8 #include "components/pref_registry/pref_registry_syncable.h" 11 #include "components/pref_registry/pref_registry_syncable.h"
9 #include "components/prefs/pref_registry_simple.h"
10 #include "components/prefs/pref_service.h"
11 #include "components/prefs/scoped_user_pref_update.h"
12 12
13 namespace { 13 namespace {
14 14
15 void TransferPrefList(const char* pref_path, 15 void TransferPrefList(const char* pref_path,
16 PrefService* src, 16 PrefService* src,
17 PrefService* dest) { 17 PrefService* dest) {
18 DCHECK(src->FindPreference(pref_path)->GetType() == base::Value::TYPE_LIST); 18 DCHECK(src->FindPreference(pref_path)->GetType() == base::Value::TYPE_LIST);
19 ListPrefUpdate update_dest(dest, pref_path); 19 ListPrefUpdate update_dest(dest, pref_path);
20 scoped_ptr<base::ListValue> src_list(src->GetList(pref_path)->DeepCopy()); 20 scoped_ptr<base::ListValue> src_list(src->GetList(pref_path)->DeepCopy());
21 update_dest->Swap(src_list.get()); 21 update_dest->Swap(src_list.get());
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 profile_prefs); 249 profile_prefs);
250 profile_prefs->SetInt64( 250 profile_prefs->SetInt64(
251 prefs::kDailyHttpContentLengthLastUpdateDate, 251 prefs::kDailyHttpContentLengthLastUpdateDate,
252 local_state_prefs->GetInt64( 252 local_state_prefs->GetInt64(
253 prefs::kDailyHttpContentLengthLastUpdateDate)); 253 prefs::kDailyHttpContentLengthLastUpdateDate));
254 local_state_prefs->ClearPref(prefs::kDailyHttpContentLengthLastUpdateDate); 254 local_state_prefs->ClearPref(prefs::kDailyHttpContentLengthLastUpdateDate);
255 profile_prefs->SetBoolean(prefs::kStatisticsPrefsMigrated, true); 255 profile_prefs->SetBoolean(prefs::kStatisticsPrefsMigrated, true);
256 } 256 }
257 257
258 } // namespace data_reduction_proxy 258 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698