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_
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"
24 namespace extensions
{
26 // Provides prefs access for managing users.
27 // Use UsersPrivateDelegateFactory to create a UsersPrivateDelegate object.
28 class UsersPrivateDelegate
: public KeyedService
{
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();
38 Profile
* profile_
; // weak; not owned by us
39 scoped_ptr
<PrefsUtil
> prefs_util_
;
42 DISALLOW_COPY_AND_ASSIGN(UsersPrivateDelegate
);
45 } // namespace extensions
47 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_H_