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

Unified Diff: webkit/appcache/mock_appcache_storage.cc

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/glue/plugins/pepper_file_chooser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/mock_appcache_storage.cc
diff --git a/webkit/appcache/mock_appcache_storage.cc b/webkit/appcache/mock_appcache_storage.cc
index a50dca614a4f62ff95013c5b905c848b4fff0d64..13ae89911656de3de19bcf07d294a02e8940d1ba 100644
--- a/webkit/appcache/mock_appcache_storage.cc
+++ b/webkit/appcache/mock_appcache_storage.cc
@@ -390,8 +390,10 @@ void MockAppCacheStorage::RunOnePendingTask() {
void MockAppCacheStorage::AddStoredCache(AppCache* cache) {
int64 cache_id = cache->cache_id();
- if (stored_caches_.find(cache_id) == stored_caches_.end())
- stored_caches_.insert(StoredCacheMap::value_type(cache_id, cache));
+ if (stored_caches_.find(cache_id) == stored_caches_.end()) {
+ stored_caches_.insert(
+ StoredCacheMap::value_type(cache_id, make_scoped_refptr(cache)));
+ }
}
void MockAppCacheStorage::RemoveStoredCache(AppCache* cache) {
@@ -411,8 +413,10 @@ void MockAppCacheStorage::RemoveStoredCaches(
void MockAppCacheStorage::AddStoredGroup(AppCacheGroup* group) {
const GURL& url = group->manifest_url();
- if (stored_groups_.find(url) == stored_groups_.end())
- stored_groups_.insert(StoredGroupMap::value_type(url, group));
+ if (stored_groups_.find(url) == stored_groups_.end()) {
+ stored_groups_.insert(
+ StoredGroupMap::value_type(url, make_scoped_refptr(group)));
+ }
}
void MockAppCacheStorage::RemoveStoredGroup(AppCacheGroup* group) {
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/glue/plugins/pepper_file_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698