| OLD | NEW |
| 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 #include "chrome/browser/managed_mode/managed_mode_site_list.h" | 5 #include "chrome/browser/managed_mode/managed_mode_site_list.h" |
| 6 | 6 |
| 7 #include "base/json/json_file_value_serializer.h" | 7 #include "base/json/json_file_value_serializer.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/common/extensions/extension.h" | 11 #include "extensions/common/extension.h" |
| 12 | 12 |
| 13 using base::DictionaryValue; | 13 using base::DictionaryValue; |
| 14 using base::ListValue; | 14 using base::ListValue; |
| 15 using base::Value; | 15 using base::Value; |
| 16 | 16 |
| 17 const int kSitelistFormatVersion = 1; | 17 const int kSitelistFormatVersion = 1; |
| 18 | 18 |
| 19 const char kCategoriesKey[] = "categories"; | 19 const char kCategoriesKey[] = "categories"; |
| 20 const char kHostnameHashesKey[] = "hostname_hashes"; | 20 const char kHostnameHashesKey[] = "hostname_hashes"; |
| 21 const char kNameKey[] = "name"; | 21 const char kNameKey[] = "name"; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 GURL base_url = | 245 GURL base_url = |
| 246 extensions::Extension::GetBaseURLFromExtensionId(extension_id_); | 246 extensions::Extension::GetBaseURLFromExtensionId(extension_id_); |
| 247 GURL thumbnail_url = base_url.Resolve(thumbnail); | 247 GURL thumbnail_url = base_url.Resolve(thumbnail); |
| 248 if (!thumbnail_url.is_valid()) { | 248 if (!thumbnail_url.is_valid()) { |
| 249 LOG(ERROR) << "Invalid thumbnail"; | 249 LOG(ERROR) << "Invalid thumbnail"; |
| 250 return; | 250 return; |
| 251 } | 251 } |
| 252 | 252 |
| 253 dest->SetString(kThumbnailUrlKey, thumbnail_url.spec()); | 253 dest->SetString(kThumbnailUrlKey, thumbnail_url.spec()); |
| 254 } | 254 } |
| OLD | NEW |