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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (handler) 102 if (handler)
103 return handler; 103 return handler;
104 104
105 GURL handler_url; 105 GURL handler_url;
106 const AppCacheEntry* entry = GetEntryAndUrlWithResponseId( 106 const AppCacheEntry* entry = GetEntryAndUrlWithResponseId(
107 response_id, &handler_url); 107 response_id, &handler_url);
108 if (!entry || !entry->IsExecutable()) 108 if (!entry || !entry->IsExecutable())
109 return NULL; 109 return NULL;
110 110
111 DCHECK(storage_->service()->handler_factory()); 111 DCHECK(storage_->service()->handler_factory());
112 scoped_ptr<AppCacheExecutableHandler> own_ptr = 112 std::unique_ptr<AppCacheExecutableHandler> own_ptr =
113 storage_->service()->handler_factory()-> 113 storage_->service()->handler_factory()->CreateHandler(handler_url,
114 CreateHandler(handler_url, handler_source); 114 handler_source);
115 handler = own_ptr.release(); 115 handler = own_ptr.release();
116 if (!handler) 116 if (!handler)
117 return NULL; 117 return NULL;
118 executable_handlers_[response_id] = handler; 118 executable_handlers_[response_id] = handler;
119 return handler; 119 return handler;
120 } 120 }
121 121
122 GURL AppCache::GetNamespaceEntryUrl(const AppCacheNamespaceVector& namespaces, 122 GURL AppCache::GetNamespaceEntryUrl(const AppCacheNamespaceVector& namespaces,
123 const GURL& namespace_url) const { 123 const GURL& namespace_url) const {
124 size_t count = namespaces.size(); 124 size_t count = namespaces.size();
(...skipping 197 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/url_request_content_job_unittest.cc ('k') | content/browser/appcache/appcache_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698