| 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/stale_cache_files_remover.h" | 5 #include "chrome/browser/chromeos/gdata/stale_cache_files_remover.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/chromeos/gdata/drive_cache.h" | 9 #include "chrome/browser/chromeos/gdata/drive_cache.h" |
| 10 #include "chrome/browser/chromeos/gdata/drive.pb.h" | |
| 11 #include "chrome/browser/chromeos/gdata/drive_file_system.h" | 10 #include "chrome/browser/chromeos/gdata/drive_file_system.h" |
| 11 #include "chrome/browser/google_apis/drive.pb.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 | 13 |
| 14 using content::BrowserThread; | 14 using content::BrowserThread; |
| 15 | 15 |
| 16 namespace gdata { | 16 namespace gdata { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Emits the log when the remove failed. | 20 // Emits the log when the remove failed. |
| 21 void EmitErrorLog(DriveFileError error, | 21 void EmitErrorLog(DriveFileError error, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // The entry is found but the MD5 does not match. | 104 // The entry is found but the MD5 does not match. |
| 105 DCHECK(entry_proto.get()); | 105 DCHECK(entry_proto.get()); |
| 106 if (!entry_proto->has_file_specific_info() || | 106 if (!entry_proto->has_file_specific_info() || |
| 107 cache_md5 != entry_proto->file_specific_info().file_md5()) { | 107 cache_md5 != entry_proto->file_specific_info().file_md5()) { |
| 108 cache_->RemoveOnUIThread(resource_id, base::Bind(&EmitErrorLog)); | 108 cache_->RemoveOnUIThread(resource_id, base::Bind(&EmitErrorLog)); |
| 109 return; | 109 return; |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace gdata | 113 } // namespace gdata |
| OLD | NEW |