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/metrics/variations/variations_service.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 7 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/metrics/variations/variations_service.h" 5 #include "chrome/browser/metrics/variations/variations_service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/build_time.h" 9 #include "base/build_time.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // it according to a value stored in the User Policy. 412 // it according to a value stored in the User Policy.
413 registry->RegisterStringPref(prefs::kVariationsRestrictParameter, 413 registry->RegisterStringPref(prefs::kVariationsRestrictParameter,
414 std::string()); 414 std::string());
415 } 415 }
416 416
417 // static 417 // static
418 void VariationsService::RegisterProfilePrefs( 418 void VariationsService::RegisterProfilePrefs(
419 user_prefs::PrefRegistrySyncable* registry) { 419 user_prefs::PrefRegistrySyncable* registry) {
420 // This preference will only be written by the policy service, which will fill 420 // This preference will only be written by the policy service, which will fill
421 // it according to a value stored in the User Policy. 421 // it according to a value stored in the User Policy.
422 registry->RegisterStringPref( 422 registry->RegisterStringPref(prefs::kVariationsRestrictParameter,
423 prefs::kVariationsRestrictParameter, 423 std::string());
424 std::string(),
425 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
426 } 424 }
427 425
428 // static 426 // static
429 scoped_ptr<VariationsService> VariationsService::Create( 427 scoped_ptr<VariationsService> VariationsService::Create(
430 PrefService* local_state, 428 PrefService* local_state,
431 metrics::MetricsStateManager* state_manager) { 429 metrics::MetricsStateManager* state_manager) {
432 scoped_ptr<VariationsService> result; 430 scoped_ptr<VariationsService> result;
433 #if !defined(GOOGLE_CHROME_BUILD) 431 #if !defined(GOOGLE_CHROME_BUILD)
434 // Unless the URL was provided, unsupported builds should return NULL to 432 // Unless the URL was provided, unsupported builds should return NULL to
435 // indicate that the service should not be used. 433 // indicate that the service should not be used.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 local_state_->SetInt64(prefs::kVariationsLastFetchTime, 640 local_state_->SetInt64(prefs::kVariationsLastFetchTime,
643 base::Time::Now().ToInternalValue()); 641 base::Time::Now().ToInternalValue());
644 } 642 }
645 } 643 }
646 644
647 std::string VariationsService::GetInvalidVariationsSeedSignature() const { 645 std::string VariationsService::GetInvalidVariationsSeedSignature() const {
648 return seed_store_.GetInvalidSignature(); 646 return seed_store_.GetInvalidSignature();
649 } 647 }
650 648
651 } // namespace chrome_variations 649 } // namespace chrome_variations
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698