| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cookie_manager.h" | 5 #include "android_webview/browser/cookie_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // Executes the |task| using |cookie_store_task_runner_|. | 300 // Executes the |task| using |cookie_store_task_runner_|. |
| 301 void CookieManager::ExecCookieTask(const base::Closure& task) { | 301 void CookieManager::ExecCookieTask(const base::Closure& task) { |
| 302 cookie_store_task_runner_->PostTask(FROM_HERE, task); | 302 cookie_store_task_runner_->PostTask(FROM_HERE, task); |
| 303 } | 303 } |
| 304 | 304 |
| 305 base::SingleThreadTaskRunner* CookieManager::GetCookieStoreTaskRunner() { | 305 base::SingleThreadTaskRunner* CookieManager::GetCookieStoreTaskRunner() { |
| 306 return cookie_store_task_runner_.get(); | 306 return cookie_store_task_runner_.get(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 net::CookieStore* CookieManager::GetCookieStore() { | 309 net::CookieStore* CookieManager::GetCookieStore() { |
| 310 DCHECK(cookie_store_task_runner_->RunsTasksOnCurrentThread()); | 310 DCHECK(cookie_store_task_runner_->RunsTasksInCurrentSequence()); |
| 311 | 311 |
| 312 if (!cookie_store_) { | 312 if (!cookie_store_) { |
| 313 FilePath user_data_dir; | 313 FilePath user_data_dir; |
| 314 GetUserDataDir(&user_data_dir); | 314 GetUserDataDir(&user_data_dir); |
| 315 FilePath cookie_store_path = | 315 FilePath cookie_store_path = |
| 316 user_data_dir.Append(FILE_PATH_LITERAL("Cookies")); | 316 user_data_dir.Append(FILE_PATH_LITERAL("Cookies")); |
| 317 | 317 |
| 318 cookie_store_backend_thread_.task_runner()->PostTask( | 318 cookie_store_backend_thread_.task_runner()->PostTask( |
| 319 FROM_HERE, base::Bind(ImportLegacyCookieStore, cookie_store_path)); | 319 FROM_HERE, base::Bind(ImportLegacyCookieStore, cookie_store_path)); |
| 320 | 320 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 623 |
| 624 net::CookieStore* GetCookieStore() { | 624 net::CookieStore* GetCookieStore() { |
| 625 return CookieManager::GetInstance()->GetCookieStore(); | 625 return CookieManager::GetInstance()->GetCookieStore(); |
| 626 } | 626 } |
| 627 | 627 |
| 628 bool RegisterCookieManager(JNIEnv* env) { | 628 bool RegisterCookieManager(JNIEnv* env) { |
| 629 return RegisterNativesImpl(env); | 629 return RegisterNativesImpl(env); |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // android_webview namespace | 632 } // android_webview namespace |
| OLD | NEW |