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

Side by Side Diff: chrome/browser/chromeos/extensions/users_private/users_private_delegate.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_ H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_ H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_ H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGATE_ H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" 13 #include "chrome/browser/extensions/api/settings_private/prefs_util.h"
14 #include "chrome/common/extensions/api/users_private.h" 14 #include "chrome/common/extensions/api/users_private.h"
15 #include "components/keyed_service/core/keyed_service.h" 15 #include "components/keyed_service/core/keyed_service.h"
16 #include "extensions/browser/extension_function.h" 16 #include "extensions/browser/extension_function.h"
17 17
18 class Profile; 18 class Profile;
19 19
20 namespace base { 20 namespace base {
21 class Value; 21 class Value;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 25
26 // Provides prefs access for managing users. 26 // Provides prefs access for managing users.
27 // Use UsersPrivateDelegateFactory to create a UsersPrivateDelegate object. 27 // Use UsersPrivateDelegateFactory to create a UsersPrivateDelegate object.
28 class UsersPrivateDelegate : public KeyedService { 28 class UsersPrivateDelegate : public KeyedService {
29 public: 29 public:
30 explicit UsersPrivateDelegate(Profile* profile); 30 explicit UsersPrivateDelegate(Profile* profile);
31 ~UsersPrivateDelegate() override; 31 ~UsersPrivateDelegate() override;
32 32
33 // Gets a PrefsUtil object used for persisting settings. 33 // Gets a PrefsUtil object used for persisting settings.
34 // The caller does not own the returned object. 34 // The caller does not own the returned object.
35 virtual PrefsUtil* GetPrefsUtil(); 35 virtual PrefsUtil* GetPrefsUtil();
36 36
37 protected: 37 protected:
38 Profile* profile_; // weak; not owned by us 38 Profile* profile_; // weak; not owned by us
39 scoped_ptr<PrefsUtil> prefs_util_; 39 std::unique_ptr<PrefsUtil> prefs_util_;
40 40
41 private: 41 private:
42 DISALLOW_COPY_AND_ASSIGN(UsersPrivateDelegate); 42 DISALLOW_COPY_AND_ASSIGN(UsersPrivateDelegate);
43 }; 43 };
44 44
45 } // namespace extensions 45 } // namespace extensions
46 46
47 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGA TE_H_ 47 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_DELEGA TE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698