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/extensions/extension_special_storage_policy.h" | 5 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 SpecialStoragePolicy::NotifyCleared(); | 297 SpecialStoragePolicy::NotifyCleared(); |
298 } | 298 } |
299 | 299 |
300 //----------------------------------------------------------------------------- | 300 //----------------------------------------------------------------------------- |
301 // SpecialCollection helper class | 301 // SpecialCollection helper class |
302 //----------------------------------------------------------------------------- | 302 //----------------------------------------------------------------------------- |
303 | 303 |
304 ExtensionSpecialStoragePolicy::SpecialCollection::SpecialCollection() {} | 304 ExtensionSpecialStoragePolicy::SpecialCollection::SpecialCollection() {} |
305 | 305 |
306 ExtensionSpecialStoragePolicy::SpecialCollection::~SpecialCollection() { | 306 ExtensionSpecialStoragePolicy::SpecialCollection::~SpecialCollection() { |
307 STLDeleteValues(&cached_results_); | 307 base::STLDeleteValues(&cached_results_); |
308 } | 308 } |
309 | 309 |
310 bool ExtensionSpecialStoragePolicy::SpecialCollection::Contains( | 310 bool ExtensionSpecialStoragePolicy::SpecialCollection::Contains( |
311 const GURL& origin) { | 311 const GURL& origin) { |
312 return !ExtensionsContaining(origin)->is_empty(); | 312 return !ExtensionsContaining(origin)->is_empty(); |
313 } | 313 } |
314 | 314 |
315 bool ExtensionSpecialStoragePolicy::SpecialCollection::GrantsCapabilitiesTo( | 315 bool ExtensionSpecialStoragePolicy::SpecialCollection::GrantsCapabilitiesTo( |
316 const GURL& origin) { | 316 const GURL& origin) { |
317 for (const auto& extension : extensions_) { | 317 for (const auto& extension : extensions_) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 ClearCache(); | 356 ClearCache(); |
357 return extensions_.Remove(extension->id()); | 357 return extensions_.Remove(extension->id()); |
358 } | 358 } |
359 | 359 |
360 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { | 360 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { |
361 ClearCache(); | 361 ClearCache(); |
362 extensions_.Clear(); | 362 extensions_.Clear(); |
363 } | 363 } |
364 | 364 |
365 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() { | 365 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() { |
366 STLDeleteValues(&cached_results_); | 366 base::STLDeleteValues(&cached_results_); |
367 } | 367 } |
OLD | NEW |