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

Side by Side Diff: chrome/browser/chromeos/login/owner_settings_service_factory.h

Issue 270663002: Implemented profile-aware owner key loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_FACTORY_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "base/macros.h"
12 #include "base/memory/singleton.h"
13 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
14
15 class KeyedService;
16 class Profile;
17
18 namespace chromeos {
19
20 class OwnerSettingsService;
21
22 class OwnerSettingsServiceFactory : public BrowserContextKeyedServiceFactory {
23 public:
24 static OwnerSettingsService* GetForProfile(Profile* profile);
25
26 static OwnerSettingsServiceFactory* GetInstance();
27
28 // Sets name of the user supposed to be owner. If profile for |username|
Nikita (slow) 2014/05/15 12:48:58 nit: an owner
ygorshenin1 2014/05/16 12:09:37 Done.
29 // is ready, request to reload owner key will be sent. Otherwise,
30 // owner key will be reloaded as soon as profile will be ready.
31 void SetUsername(const std::string& username);
32
33 // Returns the name of the user supposed to be owner.
Nikita (slow) 2014/05/15 12:48:58 nit: an owner
ygorshenin1 2014/05/16 12:09:37 Done.
34 std::string GetUsername() const;
35
36 private:
37 friend struct DefaultSingletonTraits<OwnerSettingsServiceFactory>;
38
39 OwnerSettingsServiceFactory();
40 virtual ~OwnerSettingsServiceFactory();
41
42 static KeyedService* BuildInstanceFor(content::BrowserContext* context);
43
44 // BrowserContextKeyedBaseFactory overrides:
45 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE;
46
47 // BrowserContextKeyedServiceFactory implementation:
48 virtual KeyedService* BuildServiceInstanceFor(
49 content::BrowserContext* browser_context) const OVERRIDE;
50
51 // Name of the user supposed to be owner.
Nikita (slow) 2014/05/15 12:48:58 nit: an owner
ygorshenin1 2014/05/16 12:09:37 Done.
52 std::string username_;
53
54 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceFactory);
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OWNER_SETTINGS_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698