| OLD | NEW |
| 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 CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // for the site. | 51 // for the site. |
| 52 std::vector<std::string> hostname_hashes; | 52 std::vector<std::string> hostname_hashes; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 SupervisedUserSiteList(const std::string& extension_id, | 55 SupervisedUserSiteList(const std::string& extension_id, |
| 56 const base::FilePath& path); | 56 const base::FilePath& path); |
| 57 ~SupervisedUserSiteList(); | 57 ~SupervisedUserSiteList(); |
| 58 | 58 |
| 59 // Creates a copy of the site list. | 59 // Creates a copy of the site list. |
| 60 // Caller takes ownership of the returned value. | 60 // Caller takes ownership of the returned value. |
| 61 SupervisedUserSiteList* Clone(); | 61 SupervisedUserSiteList* Clone() const; |
| 62 | 62 |
| 63 // Returns a list of all categories. | 63 // Returns a list of all categories. |
| 64 // TODO(bauerb): The list is hardcoded for now, but if we allow custom | 64 // TODO(bauerb): The list is hardcoded for now, but if we allow custom |
| 65 // categories, this should live in some registry. | 65 // categories, this should live in some registry. |
| 66 static void GetCategoryNames(std::vector<base::string16>* categories); | 66 static void GetCategoryNames(std::vector<base::string16>* categories); |
| 67 | 67 |
| 68 // Returns a list of all sites in this site list. | 68 // Returns a list of all sites in this site list. |
| 69 void GetSites(std::vector<Site>* sites); | 69 void GetSites(std::vector<Site>* sites); |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 bool LazyLoad(); | 72 bool LazyLoad(); |
| 73 void CopyThumbnailUrl(const base::DictionaryValue* source, | 73 void CopyThumbnailUrl(const base::DictionaryValue* source, |
| 74 base::DictionaryValue* dest); | 74 base::DictionaryValue* dest); |
| 75 | 75 |
| 76 std::string extension_id_; | 76 std::string extension_id_; |
| 77 base::FilePath path_; | 77 base::FilePath path_; |
| 78 scoped_ptr<base::DictionaryValue> categories_; | 78 scoped_ptr<base::DictionaryValue> categories_; |
| 79 scoped_ptr<base::ListValue> sites_; | 79 scoped_ptr<base::ListValue> sites_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSiteList); | 81 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSiteList); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ | 84 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SITE_LIST_H_ |
| OLD | NEW |