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" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 bool UpdateContent(const std::vector<DocumentFeed*>& list, | 329 bool UpdateContent(const std::vector<DocumentFeed*>& list, |
330 int largest_changestamp) { | 330 int largest_changestamp) { |
331 GURL unused; | 331 GURL unused; |
332 return file_system_->UpdateFromFeedForTesting( | 332 return file_system_->UpdateFromFeedForTesting( |
333 list, | 333 list, |
334 largest_changestamp, | 334 largest_changestamp, |
335 root_feed_changestamp_++) == GDATA_FILE_OK; | 335 root_feed_changestamp_++) == GDATA_FILE_OK; |
336 } | 336 } |
337 | 337 |
338 bool RemoveEntry(const FilePath& file_path) { | 338 bool RemoveEntry(const FilePath& file_path) { |
339 return file_system_->RemoveEntryFromFileSystem(file_path) == | 339 return file_system_->RemoveEntryAndCacheLocally(file_path) == |
340 GDATA_FILE_OK; | 340 GDATA_FILE_OK; |
341 } | 341 } |
342 | 342 |
343 FilePath GetCachePathForFile(const std::string& resource_id, | 343 FilePath GetCachePathForFile(const std::string& resource_id, |
344 const std::string& md5) { | 344 const std::string& md5) { |
345 return cache_->GetCacheFilePath(resource_id, | 345 return cache_->GetCacheFilePath(resource_id, |
346 md5, | 346 md5, |
347 GDataCache::CACHE_TYPE_TMP, | 347 GDataCache::CACHE_TYPE_TMP, |
348 GDataCache::CACHED_FILE_FROM_SERVER); | 348 GDataCache::CACHED_FILE_FROM_SERVER); |
349 } | 349 } |
(...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2618 | 2618 |
2619 // Try to close the same file twice. | 2619 // Try to close the same file twice. |
2620 file_system_->CloseFile(kFileInRoot, close_file_callback); | 2620 file_system_->CloseFile(kFileInRoot, close_file_callback); |
2621 message_loop_.Run(); | 2621 message_loop_.Run(); |
2622 | 2622 |
2623 // It must fail. | 2623 // It must fail. |
2624 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2624 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); |
2625 } | 2625 } |
2626 | 2626 |
2627 } // namespace gdata | 2627 } // namespace gdata |
OLD | NEW |