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

Side by Side Diff: content/browser/media/android/media_resource_getter_impl.cc

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media/android/media_resource_getter_impl.h" 5 #include "content/browser/media/android/media_resource_getter_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 cookie_store->GetCookiesWithOptionsAsync( 193 cookie_store->GetCookiesWithOptionsAsync(
194 url, net::CookieOptions(), callback); 194 url, net::CookieOptions(), callback);
195 } else { 195 } else {
196 callback.Run(std::string()); 196 callback.Run(std::string());
197 } 197 }
198 } 198 }
199 199
200 MediaResourceGetterImpl::MediaResourceGetterImpl( 200 MediaResourceGetterImpl::MediaResourceGetterImpl(
201 BrowserContext* browser_context, 201 BrowserContext* browser_context,
202 fileapi::FileSystemContext* file_system_context, 202 fileapi::FileSystemContext* file_system_context,
203 int renderer_id, int routing_id) 203 int renderer_id,
204 int routing_id)
204 : browser_context_(browser_context), 205 : browser_context_(browser_context),
205 file_system_context_(file_system_context), 206 file_system_context_(file_system_context),
206 weak_this_(this),
207 renderer_id_(renderer_id), 207 renderer_id_(renderer_id),
208 routing_id_(routing_id) { 208 routing_id_(routing_id),
209 } 209 weak_this_(this) {}
210 210
211 MediaResourceGetterImpl::~MediaResourceGetterImpl() {} 211 MediaResourceGetterImpl::~MediaResourceGetterImpl() {}
212 212
213 void MediaResourceGetterImpl::GetCookies( 213 void MediaResourceGetterImpl::GetCookies(
214 const GURL& url, const GURL& first_party_for_cookies, 214 const GURL& url, const GURL& first_party_for_cookies,
215 const GetCookieCB& callback) { 215 const GetCookieCB& callback) {
216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
217 scoped_refptr<CookieGetterTask> task = new CookieGetterTask( 217 scoped_refptr<CookieGetterTask> task = new CookieGetterTask(
218 browser_context_, renderer_id_, routing_id_); 218 browser_context_, renderer_id_, routing_id_);
219 219
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 FROM_HERE, 273 FROM_HERE,
274 base::Bind(&GetMediaMetadata, url, cookies, user_agent, callback)); 274 base::Bind(&GetMediaMetadata, url, cookies, user_agent, callback));
275 } 275 }
276 276
277 // static 277 // static
278 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { 278 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) {
279 return RegisterNativesImpl(env); 279 return RegisterNativesImpl(env);
280 } 280 }
281 281
282 } // namespace content 282 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698