| 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/chromeos/gdata/gdata_file_system.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2956 status, | 2956 status, |
| 2957 content_url, | 2957 content_url, |
| 2958 downloaded_file_path, | 2958 downloaded_file_path, |
| 2959 base::Owned(has_enough_space))); | 2959 base::Owned(has_enough_space))); |
| 2960 } | 2960 } |
| 2961 | 2961 |
| 2962 void GDataFileSystem::UnpinIfPinned( | 2962 void GDataFileSystem::UnpinIfPinned( |
| 2963 const std::string& resource_id, | 2963 const std::string& resource_id, |
| 2964 const std::string& md5, | 2964 const std::string& md5, |
| 2965 bool success, | 2965 bool success, |
| 2966 const GDataCache::CacheEntry& cache_entry) { | 2966 const GDataCacheEntry& cache_entry) { |
| 2967 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2967 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 2968 // TODO(hshi): http://crbug.com/127138 notify when file properties change. | 2968 // TODO(hshi): http://crbug.com/127138 notify when file properties change. |
| 2969 // This allows file manager to clear the "Available offline" checkbox. | 2969 // This allows file manager to clear the "Available offline" checkbox. |
| 2970 if (success && cache_entry.IsPinned()) | 2970 if (success && cache_entry.IsPinned()) |
| 2971 cache_->UnpinOnUIThread(resource_id, md5, CacheOperationCallback()); | 2971 cache_->UnpinOnUIThread(resource_id, md5, CacheOperationCallback()); |
| 2972 } | 2972 } |
| 2973 | 2973 |
| 2974 void GDataFileSystem::OnFileDownloadedAndSpaceChecked( | 2974 void GDataFileSystem::OnFileDownloadedAndSpaceChecked( |
| 2975 const GetFileFromCacheParams& params, | 2975 const GetFileFromCacheParams& params, |
| 2976 GDataErrorCode status, | 2976 GDataErrorCode status, |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3929 // must go through here. Removes the |file_path| from the remembered set so | 3929 // must go through here. Removes the |file_path| from the remembered set so |
| 3930 // that subsequent operations can open the file again. | 3930 // that subsequent operations can open the file again. |
| 3931 open_files_.erase(file_path); | 3931 open_files_.erase(file_path); |
| 3932 | 3932 |
| 3933 // Then invokes the user-supplied callback function. | 3933 // Then invokes the user-supplied callback function. |
| 3934 if (!callback.is_null()) | 3934 if (!callback.is_null()) |
| 3935 callback.Run(result); | 3935 callback.Run(result); |
| 3936 } | 3936 } |
| 3937 | 3937 |
| 3938 } // namespace gdata | 3938 } // namespace gdata |
| OLD | NEW |