OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "android_webview/browser/net/aw_cookie_store_wrapper.h" | 5 #include "android_webview/browser/net/aw_cookie_store_wrapper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "android_webview/browser/net/init_native_callback.h" | 9 #include "android_webview/browser/net/init_native_callback.h" |
10 #include "base/memory/ref_counted_delete_on_message_loop.h" | 10 #include "base/memory/ref_counted_delete_on_message_loop.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace android_webview { | 14 namespace android_webview { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Posts |task| to the thread that the global CookieStore lives on. | 18 // Posts |task| to the thread that the global CookieStore lives on. |
19 void PostTaskToCookieStoreTaskRunner(const base::Closure& task) { | 19 void PostTaskToCookieStoreTaskRunner(const base::Closure& task) { |
20 GetCookieStoreTaskRunner()->PostTask(FROM_HERE, task); | 20 GetCookieStoreTaskRunner()->PostTask(FROM_HERE, task); |
21 } | 21 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, | 348 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, |
349 weak_factory_.GetWeakPtr(), callback)); | 349 weak_factory_.GetWeakPtr(), callback)); |
350 } | 350 } |
351 | 351 |
352 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { | 352 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { |
353 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 353 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
354 callback.Run(); | 354 callback.Run(); |
355 } | 355 } |
356 | 356 |
357 } // namespace android_webview | 357 } // namespace android_webview |
OLD | NEW |