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

Side by Side Diff: chrome/browser/managed_mode/managed_mode_site_list.h

Issue 11826059: Add ManagedUserService for profile-specific managed user data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_ 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_ 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // A list of SHA1 hashes of hostnames that should be whitelisted 56 // A list of SHA1 hashes of hostnames that should be whitelisted
57 // for the site. 57 // for the site.
58 std::vector<std::string> hostname_hashes; 58 std::vector<std::string> hostname_hashes;
59 }; 59 };
60 60
61 ManagedModeSiteList(const std::string& extension_id, 61 ManagedModeSiteList(const std::string& extension_id,
62 const ExtensionResource& path); 62 const ExtensionResource& path);
63 ~ManagedModeSiteList(); 63 ~ManagedModeSiteList();
64 64
65 // Creates a copy of the site list.
66 // Caller takes ownership of the returned value.
67 ManagedModeSiteList* Clone();
68
65 // Returns a list of all categories. 69 // Returns a list of all categories.
66 // TODO(bauerb): The list is hardcoded for now, but if we allow custom 70 // TODO(bauerb): The list is hardcoded for now, but if we allow custom
67 // categories, this should live in some registry. 71 // categories, this should live in some registry.
68 static void GetCategoryNames(std::vector<string16>* categories); 72 static void GetCategoryNames(std::vector<string16>* categories);
69 73
70 // Returns a list of all sites in this site list. 74 // Returns a list of all sites in this site list.
71 void GetSites(std::vector<Site>* sites); 75 void GetSites(std::vector<Site>* sites);
72 76
73 private: 77 private:
74 bool LazyLoad(); 78 bool LazyLoad();
75 void CopyThumbnailUrl(const base::DictionaryValue* source, 79 void CopyThumbnailUrl(const base::DictionaryValue* source,
76 base::DictionaryValue* dest); 80 base::DictionaryValue* dest);
77 81
78 std::string extension_id_; 82 std::string extension_id_;
79 ExtensionResource path_; 83 ExtensionResource path_;
80 scoped_ptr<base::DictionaryValue> categories_; 84 scoped_ptr<base::DictionaryValue> categories_;
81 scoped_ptr<base::ListValue> sites_; 85 scoped_ptr<base::ListValue> sites_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(ManagedModeSiteList); 87 DISALLOW_COPY_AND_ASSIGN(ManagedModeSiteList);
84 }; 88 };
85 89
86 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_ 90 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_SITE_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698