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 "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/storage_partition.h" | 12 #include "content/public/browser/storage_partition.h" |
13 #include "webkit/dom_storage/dom_storage_types.h" | 13 #include "webkit/common/dom_storage/dom_storage_types.h" |
14 | 14 |
15 using content::BrowserContext; | 15 using content::BrowserContext; |
16 using content::BrowserThread; | 16 using content::BrowserThread; |
17 using content::DOMStorageContext; | 17 using content::DOMStorageContext; |
18 | 18 |
19 BrowsingDataLocalStorageHelper::LocalStorageInfo::LocalStorageInfo( | 19 BrowsingDataLocalStorageHelper::LocalStorageInfo::LocalStorageInfo( |
20 const GURL& origin_url, int64 size, base::Time last_modified) | 20 const GURL& origin_url, int64 size, base::Time last_modified) |
21 : origin_url(origin_url), size(size), last_modified(last_modified) {} | 21 : origin_url(origin_url), size(size), last_modified(last_modified) {} |
22 | 22 |
23 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {} | 23 BrowsingDataLocalStorageHelper::LocalStorageInfo::~LocalStorageInfo() {} |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 for (std::set<GURL>::iterator iter = pending_local_storage_info_.begin(); | 142 for (std::set<GURL>::iterator iter = pending_local_storage_info_.begin(); |
143 iter != pending_local_storage_info_.end(); ++iter) { | 143 iter != pending_local_storage_info_.end(); ++iter) { |
144 local_storage_info_.push_back( | 144 local_storage_info_.push_back( |
145 LocalStorageInfo(*iter, 0, base::Time())); | 145 LocalStorageInfo(*iter, 0, base::Time())); |
146 } | 146 } |
147 base::MessageLoop::current()->PostTask( | 147 base::MessageLoop::current()->PostTask( |
148 FROM_HERE, | 148 FROM_HERE, |
149 base::Bind(&CannedBrowsingDataLocalStorageHelper::CallCompletionCallback, | 149 base::Bind(&CannedBrowsingDataLocalStorageHelper::CallCompletionCallback, |
150 this)); | 150 this)); |
151 } | 151 } |
OLD | NEW |