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_file_system_helper.h" | 5 #include "chrome/browser/browsing_data_file_system_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "webkit/fileapi/file_system_context.h" | 16 #include "webkit/fileapi/file_system_context.h" |
17 #include "webkit/fileapi/file_system_quota_util.h" | 17 #include "webkit/fileapi/file_system_quota_util.h" |
18 #include "webkit/fileapi/file_system_types.h" | 18 #include "webkit/fileapi/file_system_types.h" |
19 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 19 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
20 | 20 |
| 21 using content::BrowserThread; |
| 22 |
21 namespace { | 23 namespace { |
22 | 24 |
23 // An implementation of the BrowsingDataFileSystemHelper interface that pulls | 25 // An implementation of the BrowsingDataFileSystemHelper interface that pulls |
24 // data from a given |profile| and returns a list of FileSystemInfo items to a | 26 // data from a given |profile| and returns a list of FileSystemInfo items to a |
25 // client. | 27 // client. |
26 class BrowsingDataFileSystemHelperImpl : public BrowsingDataFileSystemHelper { | 28 class BrowsingDataFileSystemHelperImpl : public BrowsingDataFileSystemHelper { |
27 public: | 29 public: |
28 // BrowsingDataFileSystemHelper implementation | 30 // BrowsingDataFileSystemHelper implementation |
29 explicit BrowsingDataFileSystemHelperImpl(Profile* profile); | 31 explicit BrowsingDataFileSystemHelperImpl(Profile* profile); |
30 virtual void StartFetching(const base::Callback< | 32 virtual void StartFetching(const base::Callback< |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 completion_callback_.Run(file_system_info_); | 275 completion_callback_.Run(file_system_info_); |
274 completion_callback_.Reset(); | 276 completion_callback_.Reset(); |
275 } | 277 } |
276 is_fetching_ = false; | 278 is_fetching_ = false; |
277 } | 279 } |
278 | 280 |
279 void CannedBrowsingDataFileSystemHelper::CancelNotification() { | 281 void CannedBrowsingDataFileSystemHelper::CancelNotification() { |
280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
281 completion_callback_.Reset(); | 283 completion_callback_.Reset(); |
282 } | 284 } |
OLD | NEW |