OLD | NEW |
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/storage_partition_impl.h" | 5 #include "content/browser/storage_partition_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> |
8 | 9 |
9 #include <set> | 10 #include <set> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
14 #include "base/location.h" | 15 #include "base/location.h" |
15 #include "base/sequenced_task_runner.h" | 16 #include "base/sequenced_task_runner.h" |
16 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
17 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 namespace content { | 58 namespace content { |
58 | 59 |
59 namespace { | 60 namespace { |
60 | 61 |
61 bool DoesCookieMatchHost(const std::string& host, | 62 bool DoesCookieMatchHost(const std::string& host, |
62 const net::CanonicalCookie& cookie) { | 63 const net::CanonicalCookie& cookie) { |
63 return cookie.IsHostCookie() && cookie.IsDomainMatch(host); | 64 return cookie.IsHostCookie() && cookie.IsDomainMatch(host); |
64 } | 65 } |
65 | 66 |
66 void OnClearedCookies(const base::Closure& callback, int num_deleted) { | 67 void OnClearedCookies(const base::Closure& callback, uint32_t num_deleted) { |
67 // The final callback needs to happen from UI thread. | 68 // The final callback needs to happen from UI thread. |
68 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 69 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
69 BrowserThread::PostTask( | 70 BrowserThread::PostTask( |
70 BrowserThread::UI, FROM_HERE, | 71 BrowserThread::UI, FROM_HERE, |
71 base::Bind(&OnClearedCookies, callback, num_deleted)); | 72 base::Bind(&OnClearedCookies, callback, num_deleted)); |
72 return; | 73 return; |
73 } | 74 } |
74 | 75 |
75 callback.Run(); | 76 callback.Run(); |
76 } | 77 } |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 media_url_request_context_ = media_url_request_context; | 991 media_url_request_context_ = media_url_request_context; |
991 } | 992 } |
992 | 993 |
993 void StoragePartitionImpl::GetQuotaSettings( | 994 void StoragePartitionImpl::GetQuotaSettings( |
994 storage::OptionalQuotaSettingsCallback callback) { | 995 storage::OptionalQuotaSettingsCallback callback) { |
995 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, | 996 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, |
996 std::move(callback)); | 997 std::move(callback)); |
997 } | 998 } |
998 | 999 |
999 } // namespace content | 1000 } // namespace content |
OLD | NEW |