| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/chromeos/gdata/drive.pb.h" | 16 #include "chrome/browser/chromeos/gdata/drive.pb.h" |
| 17 #include "chrome/browser/chromeos/gdata/drive_api_parser.h" | |
| 18 #include "chrome/browser/chromeos/gdata/drive_file_system.h" | 17 #include "chrome/browser/chromeos/gdata/drive_file_system.h" |
| 19 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" | 18 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" |
| 20 #include "chrome/browser/chromeos/gdata/gdata_test_util.h" | 19 #include "chrome/browser/chromeos/gdata/gdata_test_util.h" |
| 21 #include "chrome/browser/chromeos/gdata/gdata_uploader.h" | 20 #include "chrome/browser/chromeos/gdata/gdata_uploader.h" |
| 22 #include "chrome/browser/chromeos/gdata/gdata_util.h" | 21 #include "chrome/browser/chromeos/gdata/gdata_util.h" |
| 23 #include "chrome/browser/chromeos/gdata/mock_directory_change_observer.h" | 22 #include "chrome/browser/chromeos/gdata/mock_directory_change_observer.h" |
| 24 #include "chrome/browser/chromeos/gdata/mock_drive_cache_observer.h" | 23 #include "chrome/browser/chromeos/gdata/mock_drive_cache_observer.h" |
| 25 #include "chrome/browser/chromeos/gdata/mock_drive_service.h" | 24 #include "chrome/browser/chromeos/gdata/mock_drive_service.h" |
| 26 #include "chrome/browser/chromeos/gdata/mock_drive_web_apps_registry.h" | 25 #include "chrome/browser/chromeos/gdata/mock_drive_web_apps_registry.h" |
| 27 #include "chrome/browser/chromeos/gdata/mock_free_disk_space_getter.h" | 26 #include "chrome/browser/chromeos/gdata/mock_free_disk_space_getter.h" |
| 28 #include "chrome/browser/chromeos/gdata/mock_gdata_uploader.h" | 27 #include "chrome/browser/chromeos/gdata/mock_gdata_uploader.h" |
| 29 #include "chrome/browser/chromeos/gdata/stale_cache_files_remover.h" | 28 #include "chrome/browser/chromeos/gdata/stale_cache_files_remover.h" |
| 29 #include "chrome/browser/google_api/drive_api_parser.h" |
| 30 #include "chrome/test/base/testing_profile.h" | 30 #include "chrome/test/base/testing_profile.h" |
| 31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/test/test_browser_thread.h" | 32 #include "content/public/test/test_browser_thread.h" |
| 33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 | 35 |
| 36 using ::testing::AtLeast; | 36 using ::testing::AtLeast; |
| 37 using ::testing::Eq; | 37 using ::testing::Eq; |
| 38 using ::testing::NotNull; | 38 using ::testing::NotNull; |
| 39 using ::testing::Return; | 39 using ::testing::Return; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 // Verify that the cache file is deleted. | 217 // Verify that the cache file is deleted. |
| 218 path = cache_->GetCacheFilePath(resource_id, | 218 path = cache_->GetCacheFilePath(resource_id, |
| 219 md5, | 219 md5, |
| 220 DriveCache::CACHE_TYPE_TMP, | 220 DriveCache::CACHE_TYPE_TMP, |
| 221 DriveCache::CACHED_FILE_FROM_SERVER); | 221 DriveCache::CACHED_FILE_FROM_SERVER); |
| 222 EXPECT_FALSE(file_util::PathExists(path)); | 222 EXPECT_FALSE(file_util::PathExists(path)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace gdata | 225 } // namespace gdata |
| OLD | NEW |