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

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

Issue 961683002: Move ManagedBookmarksTracker from policy/core/browser to bookmarks/managed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add back to policy DEPS Created 5 years, 9 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_POLICY_CORE_BROWSER_MANAGED_BOOKMARKS_TRACKER_H_ 5 #ifndef COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
6 #define COMPONENTS_POLICY_CORE_BROWSER_MANAGED_BOOKMARKS_TRACKER_H_ 6 #define COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "components/policy/policy_export.h"
13 12
14 class GURL; 13 class GURL;
15 class PrefService; 14 class PrefService;
16 15
17 namespace base { 16 namespace base {
18 class ListValue; 17 class ListValue;
19 } 18 }
20 19
21 namespace bookmarks { 20 namespace bookmarks {
21
22 class BookmarkModel; 22 class BookmarkModel;
23 class BookmarkNode; 23 class BookmarkNode;
24 class BookmarkPermanentNode; 24 class BookmarkPermanentNode;
25 }
26
27 namespace policy {
28 25
29 // Tracks either the Managed Bookmarks pref (set by policy) or the Supervised 26 // Tracks either the Managed Bookmarks pref (set by policy) or the Supervised
30 // Bookmarks pref (set for a supervised user by their custodian) and makes the 27 // Bookmarks pref (set for a supervised user by their custodian) and makes the
31 // managed_node()/supervised_node() in the BookmarkModel follow the 28 // managed_node()/supervised_node() in the BookmarkModel follow the
32 // policy/custodian-defined bookmark tree. 29 // policy/custodian-defined bookmark tree.
33 class POLICY_EXPORT ManagedBookmarksTracker { 30 class ManagedBookmarksTracker {
34 public: 31 public:
35 typedef base::Callback<std::string()> GetManagementDomainCallback; 32 typedef base::Callback<std::string()> GetManagementDomainCallback;
36 33
37 // Shared constants used in the policy configuration. 34 // Shared constants used in the policy configuration.
38 static const char kName[]; 35 static const char kName[];
39 static const char kUrl[]; 36 static const char kUrl[];
40 static const char kChildren[]; 37 static const char kChildren[];
41 38
42 // If |is_supervised| is true, this will track supervised bookmarks rather 39 // If |is_supervised| is true, this will track supervised bookmarks rather
43 // than managed bookmarks. 40 // than managed bookmarks.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bookmarks::BookmarkModel* model_; 81 bookmarks::BookmarkModel* model_;
85 const bool is_supervised_; 82 const bool is_supervised_;
86 bookmarks::BookmarkPermanentNode* managed_node_; 83 bookmarks::BookmarkPermanentNode* managed_node_;
87 PrefService* prefs_; 84 PrefService* prefs_;
88 PrefChangeRegistrar registrar_; 85 PrefChangeRegistrar registrar_;
89 GetManagementDomainCallback get_management_domain_callback_; 86 GetManagementDomainCallback get_management_domain_callback_;
90 87
91 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksTracker); 88 DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksTracker);
92 }; 89 };
93 90
94 } // namespace policy 91 } // namespace bookmarks
95 92
96 #endif // COMPONENTS_POLICY_CORE_BROWSER_MANAGED_BOOKMARKS_TRACKER_H_ 93 #endif // COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
97 94
OLDNEW
« no previous file with comments | « components/bookmarks/managed/BUILD.gn ('k') | components/bookmarks/managed/managed_bookmarks_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698