OLD | NEW |
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 void CookieGetterTask::CheckPolicyForCookies( | 183 void CookieGetterTask::CheckPolicyForCookies( |
184 const GURL& url, const GURL& first_party_for_cookies, | 184 const GURL& url, const GURL& first_party_for_cookies, |
185 const media::MediaResourceGetter::GetCookieCB& callback, | 185 const media::MediaResourceGetter::GetCookieCB& callback, |
186 const net::CookieList& cookie_list) { | 186 const net::CookieList& cookie_list) { |
187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
188 if (GetContentClient()->browser()->AllowGetCookie( | 188 if (GetContentClient()->browser()->AllowGetCookie( |
189 url, first_party_for_cookies, cookie_list, | 189 url, first_party_for_cookies, cookie_list, |
190 resource_context_, render_process_id_, render_frame_id_)) { | 190 resource_context_, render_process_id_, render_frame_id_)) { |
191 net::CookieStore* cookie_store = | 191 net::CookieStore* cookie_store = |
192 context_getter_->GetURLRequestContext()->cookie_store(); | 192 context_getter_->GetURLRequestContext()->cookie_store(); |
193 cookie_store->GetCookiesWithOptionsAsync( | 193 net::CookieOptions options; |
194 url, net::CookieOptions(), callback); | 194 options.set_include_httponly(); |
| 195 cookie_store->GetCookiesWithOptionsAsync(url, options, callback); |
195 } else { | 196 } else { |
196 callback.Run(std::string()); | 197 callback.Run(std::string()); |
197 } | 198 } |
198 } | 199 } |
199 | 200 |
200 MediaResourceGetterImpl::MediaResourceGetterImpl( | 201 MediaResourceGetterImpl::MediaResourceGetterImpl( |
201 BrowserContext* browser_context, | 202 BrowserContext* browser_context, |
202 fileapi::FileSystemContext* file_system_context, | 203 fileapi::FileSystemContext* file_system_context, |
203 int render_process_id, | 204 int render_process_id, |
204 int render_frame_id) | 205 int render_frame_id) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 FROM_HERE, | 276 FROM_HERE, |
276 base::Bind(&GetMediaMetadata, url, cookies, user_agent, callback)); | 277 base::Bind(&GetMediaMetadata, url, cookies, user_agent, callback)); |
277 } | 278 } |
278 | 279 |
279 // static | 280 // static |
280 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { | 281 bool MediaResourceGetterImpl::RegisterMediaResourceGetter(JNIEnv* env) { |
281 return RegisterNativesImpl(env); | 282 return RegisterNativesImpl(env); |
282 } | 283 } |
283 | 284 |
284 } // namespace content | 285 } // namespace content |
OLD | NEW |