Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / users_private / users_private_delegate.h
blobbb9027555bcf781b20c327ce56b96e47348c8818
1 // Copyright 2015 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_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_H_
8 #include <map>
9 #include <string>
11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/extensions/api/settings_private/prefs_util.h"
14 #include "chrome/common/extensions/api/users_private.h"
15 #include "components/keyed_service/core/keyed_service.h"
16 #include "extensions/browser/extension_function.h"
18 class Profile;
20 namespace base {
21 class Value;
24 namespace extensions {
26 // Provides prefs access for managing users.
27 // Use UsersPrivateDelegateFactory to create a UsersPrivateDelegate object.
28 class UsersPrivateDelegate : public KeyedService {
29 public:
30 explicit UsersPrivateDelegate(Profile* profile);
31 ~UsersPrivateDelegate() override;
33 // Gets a PrefsUtil object used for persisting settings.
34 // The caller does not own the returned object.
35 virtual PrefsUtil* GetPrefsUtil();
37 protected:
38 Profile* profile_; // weak; not owned by us
39 scoped_ptr<PrefsUtil> prefs_util_;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(UsersPrivateDelegate);
45 } // namespace extensions
47 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_H_