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 "chrome/browser/browsing_data_local_storage_helper.h" | 5 #include "chrome/browser/browsing_data_local_storage_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 origin(origin), | 43 origin(origin), |
44 file_path(file_path), | 44 file_path(file_path), |
45 size(size), | 45 size(size), |
46 last_modified(last_modified) { | 46 last_modified(last_modified) { |
47 } | 47 } |
48 | 48 |
49 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {} | 49 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {} |
50 | 50 |
51 BrowsingDataLocalStorageHelper::BrowsingDataLocalStorageHelper( | 51 BrowsingDataLocalStorageHelper::BrowsingDataLocalStorageHelper( |
52 Profile* profile) | 52 Profile* profile) |
53 : dom_storage_context_(DOMStorageContext::GetForBrowserContext(profile)), | 53 : dom_storage_context_(BrowserContext::GetDOMStorageContext(profile)), |
54 is_fetching_(false) { | 54 is_fetching_(false) { |
55 DCHECK(dom_storage_context_.get()); | 55 DCHECK(dom_storage_context_.get()); |
56 } | 56 } |
57 | 57 |
58 BrowsingDataLocalStorageHelper::~BrowsingDataLocalStorageHelper() { | 58 BrowsingDataLocalStorageHelper::~BrowsingDataLocalStorageHelper() { |
59 } | 59 } |
60 | 60 |
61 void BrowsingDataLocalStorageHelper::StartFetching( | 61 void BrowsingDataLocalStorageHelper::StartFetching( |
62 const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback) { | 62 const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback) { |
63 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 63 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 0, | 221 0, |
222 base::Time())); | 222 base::Time())); |
223 } | 223 } |
224 pending_local_storage_info_.clear(); | 224 pending_local_storage_info_.clear(); |
225 | 225 |
226 BrowserThread::PostTask( | 226 BrowserThread::PostTask( |
227 BrowserThread::UI, FROM_HERE, | 227 BrowserThread::UI, FROM_HERE, |
228 base::Bind(&CannedBrowsingDataLocalStorageHelper::NotifyInUIThread, | 228 base::Bind(&CannedBrowsingDataLocalStorageHelper::NotifyInUIThread, |
229 this)); | 229 this)); |
230 } | 230 } |
OLD | NEW |