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

Side by Side Diff: content/browser/appcache/appcache.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
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 #include "content/browser/appcache/appcache.h" 5 #include "content/browser/appcache/appcache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 AppCache::~AppCache() { 31 AppCache::~AppCache() {
32 DCHECK(associated_hosts_.empty()); 32 DCHECK(associated_hosts_.empty());
33 if (owning_group_.get()) { 33 if (owning_group_.get()) {
34 DCHECK(is_complete_); 34 DCHECK(is_complete_);
35 owning_group_->RemoveCache(this); 35 owning_group_->RemoveCache(this);
36 } 36 }
37 DCHECK(!owning_group_.get()); 37 DCHECK(!owning_group_.get());
38 storage_->working_set()->RemoveCache(this); 38 storage_->working_set()->RemoveCache(this);
39 STLDeleteContainerPairSecondPointers( 39 base::STLDeleteContainerPairSecondPointers(executable_handlers_.begin(),
40 executable_handlers_.begin(), executable_handlers_.end()); 40 executable_handlers_.end());
41 } 41 }
42 42
43 void AppCache::UnassociateHost(AppCacheHost* host) { 43 void AppCache::UnassociateHost(AppCacheHost* host) {
44 associated_hosts_.erase(host); 44 associated_hosts_.erase(host);
45 } 45 }
46 46
47 void AppCache::AddEntry(const GURL& url, const AppCacheEntry& entry) { 47 void AppCache::AddEntry(const GURL& url, const AppCacheEntry& entry) {
48 DCHECK(entries_.find(url) == entries_.end()); 48 DCHECK(entries_.find(url) == entries_.end());
49 entries_.insert(EntryMap::value_type(url, entry)); 49 entries_.insert(EntryMap::value_type(url, entry));
50 cache_size_ += entry.response_size(); 50 cache_size_ += entry.response_size();
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 const GURL& url) { 322 const GURL& url) {
323 size_t count = namespaces.size(); 323 size_t count = namespaces.size();
324 for (size_t i = 0; i < count; ++i) { 324 for (size_t i = 0; i < count; ++i) {
325 if (namespaces[i].IsMatch(url)) 325 if (namespaces[i].IsMatch(url))
326 return &namespaces[i]; 326 return &namespaces[i];
327 } 327 }
328 return NULL; 328 return NULL;
329 } 329 }
330 330
331 } // namespace content 331 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/synchronous_compositor_observer.cc ('k') | content/browser/appcache/appcache_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698