Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / browser / profiles / chrome_version_service.h
blob4102c458031fa95e3f808ff6fa9d36316b949996
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILES_CHROME_VERSION_SERVICE_H_
6 #define CHROME_BROWSER_PROFILES_CHROME_VERSION_SERVICE_H_
8 #include <string>
10 #include "base/basictypes.h"
12 class PrefService;
14 namespace user_prefs {
15 class PrefRegistrySyncable;
18 // This service manages a pref which is used to determine the version of
19 // Chrome by which the profile was created.
20 class ChromeVersionService {
21 public:
22 // Register the user pref we use.
23 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
25 // Sets the version string in the pref for the current profile.
26 static void SetVersion(PrefService* prefs, const std::string& version);
28 // Returns the version of Chrome which created the profile.
29 static std::string GetVersion(PrefService* prefs);
31 // Handles setting the profile.created_by_version Pref
32 static void OnProfileLoaded(PrefService* prefs, bool is_new_profile);
34 private:
35 DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeVersionService);
38 #endif // CHROME_BROWSER_PROFILES_CHROME_VERSION_SERVICE_H_