| 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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 } // namespace | 127 } // namespace |
| 128 | 128 |
| 129 ManagedModeSiteList::Site::Site(const string16& name, | 129 ManagedModeSiteList::Site::Site(const string16& name, |
| 130 int category_id) | 130 int category_id) |
| 131 : name(name), | 131 : name(name), |
| 132 category_id(category_id) {} | 132 category_id(category_id) {} |
| 133 | 133 |
| 134 ManagedModeSiteList::Site::~Site() {} | 134 ManagedModeSiteList::Site::~Site() {} |
| 135 | 135 |
| 136 ManagedModeSiteList::ManagedModeSiteList(const std::string& extension_id, | 136 ManagedModeSiteList::ManagedModeSiteList( |
| 137 const ExtensionResource& path) | 137 const std::string& extension_id, |
| 138 const extensions::ExtensionResource& path) |
| 138 : extension_id_(extension_id), | 139 : extension_id_(extension_id), |
| 139 path_(path) { | 140 path_(path) { |
| 140 } | 141 } |
| 141 | 142 |
| 142 ManagedModeSiteList::~ManagedModeSiteList() { | 143 ManagedModeSiteList::~ManagedModeSiteList() { |
| 143 } | 144 } |
| 144 | 145 |
| 145 ManagedModeSiteList* ManagedModeSiteList::Clone() { | 146 ManagedModeSiteList* ManagedModeSiteList::Clone() { |
| 146 return new ManagedModeSiteList(extension_id_, path_); | 147 return new ManagedModeSiteList(extension_id_, path_); |
| 147 } | 148 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 GURL base_url = | 247 GURL base_url = |
| 247 extensions::Extension::GetBaseURLFromExtensionId(extension_id_); | 248 extensions::Extension::GetBaseURLFromExtensionId(extension_id_); |
| 248 GURL thumbnail_url = base_url.Resolve(thumbnail); | 249 GURL thumbnail_url = base_url.Resolve(thumbnail); |
| 249 if (!thumbnail_url.is_valid()) { | 250 if (!thumbnail_url.is_valid()) { |
| 250 LOG(ERROR) << "Invalid thumbnail"; | 251 LOG(ERROR) << "Invalid thumbnail"; |
| 251 return; | 252 return; |
| 252 } | 253 } |
| 253 | 254 |
| 254 dest->SetString(kThumbnailUrlKey, thumbnail_url.spec()); | 255 dest->SetString(kThumbnailUrlKey, thumbnail_url.spec()); |
| 255 } | 256 } |
| OLD | NEW |