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

Side by Side Diff: content/browser/net/view_http_cache_job_factory.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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/net/view_http_cache_job_factory.h" 5 #include "content/browser/net/view_http_cache_job_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 97
98 void ViewHttpCacheJob::Start() { 98 void ViewHttpCacheJob::Start() {
99 base::MessageLoop::current()->PostTask( 99 base::MessageLoop::current()->PostTask(
100 FROM_HERE, 100 FROM_HERE,
101 base::Bind(&ViewHttpCacheJob::StartAsync, weak_factory_.GetWeakPtr())); 101 base::Bind(&ViewHttpCacheJob::StartAsync, weak_factory_.GetWeakPtr()));
102 } 102 }
103 103
104 void ViewHttpCacheJob::Kill() { 104 void ViewHttpCacheJob::Kill() {
105 weak_factory_.InvalidateWeakPtrs(); 105 weak_factory_.InvalidateWeakPtrs();
106 if (core_) { 106 if (core_.get()) {
107 core_->Orphan(); 107 core_->Orphan();
108 core_ = NULL; 108 core_ = NULL;
109 } 109 }
110 net::URLRequestJob::Kill(); 110 net::URLRequestJob::Kill();
111 } 111 }
112 112
113 void ViewHttpCacheJob::StartAsync() { 113 void ViewHttpCacheJob::StartAsync() {
114 DCHECK(request()); 114 DCHECK(request());
115 115
116 if (!request()) 116 if (!request())
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 url.host() == kChromeUINetworkViewCacheHost; 194 url.host() == kChromeUINetworkViewCacheHost;
195 } 195 }
196 196
197 // Static. 197 // Static.
198 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( 198 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest(
199 net::URLRequest* request, net::NetworkDelegate* network_delegate) { 199 net::URLRequest* request, net::NetworkDelegate* network_delegate) {
200 return new ViewHttpCacheJob(request, network_delegate); 200 return new ViewHttpCacheJob(request, network_delegate);
201 } 201 }
202 202
203 } // namespace content 203 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/net/sqlite_persistent_cookie_store.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698