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

Side by Side Diff: components/bookmarks/managed/managed_bookmarks_tracker.h

Issue 1906973002: Convert //components/bookmarks from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_ 5 #ifndef COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
6 #define COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_ 6 #define COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
12
11 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "components/prefs/pref_change_registrar.h" 16 #include "components/prefs/pref_change_registrar.h"
16 17
17 class GURL; 18 class GURL;
18 class PrefService; 19 class PrefService;
19 20
20 namespace base { 21 namespace base {
21 class ListValue; 22 class ListValue;
22 } 23 }
23 24
(...skipping 20 matching lines...) Expand all
44 // If |is_supervised| is true, this will track supervised bookmarks rather 45 // If |is_supervised| is true, this will track supervised bookmarks rather
45 // than managed bookmarks. 46 // than managed bookmarks.
46 ManagedBookmarksTracker(BookmarkModel* model, 47 ManagedBookmarksTracker(BookmarkModel* model,
47 PrefService* prefs, 48 PrefService* prefs,
48 bool is_supervised, 49 bool is_supervised,
49 const GetManagementDomainCallback& callback); 50 const GetManagementDomainCallback& callback);
50 ~ManagedBookmarksTracker(); 51 ~ManagedBookmarksTracker();
51 52
52 // Returns the initial list of managed bookmarks, which can be passed to 53 // Returns the initial list of managed bookmarks, which can be passed to
53 // LoadInitial() to do the initial load. 54 // LoadInitial() to do the initial load.
54 scoped_ptr<base::ListValue> GetInitialManagedBookmarks(); 55 std::unique_ptr<base::ListValue> GetInitialManagedBookmarks();
55 56
56 // Loads the initial managed/supervised bookmarks in |list| into |folder|. 57 // Loads the initial managed/supervised bookmarks in |list| into |folder|.
57 // New nodes will be assigned IDs starting at |next_node_id|. 58 // New nodes will be assigned IDs starting at |next_node_id|.
58 // Returns the next node ID to use. 59 // Returns the next node ID to use.
59 static int64_t LoadInitial(BookmarkNode* folder, 60 static int64_t LoadInitial(BookmarkNode* folder,
60 const base::ListValue* list, 61 const base::ListValue* list,
61 int64_t next_node_id); 62 int64_t next_node_id);
62 63
63 // Starts tracking the pref for updates to the managed/supervised bookmarks. 64 // Starts tracking the pref for updates to the managed/supervised bookmarks.
64 // Should be called after loading the initial bookmarks. 65 // Should be called after loading the initial bookmarks.
(...skipping 24 matching lines...) Expand all
89 PrefChangeRegistrar registrar_; 90 PrefChangeRegistrar registrar_;
90 GetManagementDomainCallback get_management_domain_callback_; 91 GetManagementDomainCallback get_management_domain_callback_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksTracker); 93 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksTracker);
93 }; 94 };
94 95
95 } // namespace bookmarks 96 } // namespace bookmarks
96 97
97 #endif // COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_ 98 #endif // COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
98 99
OLDNEW
« no previous file with comments | « components/bookmarks/managed/managed_bookmark_service.cc ('k') | components/bookmarks/managed/managed_bookmarks_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698