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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 << directory_path.DirName().value(); | 323 << directory_path.DirName().value(); |
324 } | 324 } |
325 | 325 |
326 // Updates the content of directory under |directory_path| with parsed feed | 326 // Updates the content of directory under |directory_path| with parsed feed |
327 // |value|. | 327 // |value|. |
328 bool UpdateContent(const std::vector<DocumentFeed*>& list, | 328 bool UpdateContent(const std::vector<DocumentFeed*>& list, |
329 int largest_changestamp) { | 329 int largest_changestamp) { |
330 GURL unused; | 330 GURL unused; |
331 return file_system_->UpdateFromFeed( | 331 return file_system_->UpdateFromFeed( |
332 list, | 332 list, |
333 FROM_SERVER, | |
334 largest_changestamp, | 333 largest_changestamp, |
335 root_feed_changestamp_++) == GDATA_FILE_OK; | 334 root_feed_changestamp_++) == GDATA_FILE_OK; |
336 } | 335 } |
337 | 336 |
338 bool RemoveEntry(const FilePath& file_path) { | 337 bool RemoveEntry(const FilePath& file_path) { |
339 return file_system_->RemoveEntryFromFileSystem(file_path) == | 338 return file_system_->RemoveEntryFromFileSystem(file_path) == |
340 GDATA_FILE_OK; | 339 GDATA_FILE_OK; |
341 } | 340 } |
342 | 341 |
343 FilePath GetCachePathForFile(const std::string& resource_id, | 342 FilePath GetCachePathForFile(const std::string& resource_id, |
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 | 2555 |
2557 // Try to close the same file twice. | 2556 // Try to close the same file twice. |
2558 file_system_->CloseFile(kFileInRoot, close_file_callback); | 2557 file_system_->CloseFile(kFileInRoot, close_file_callback); |
2559 message_loop_.Run(); | 2558 message_loop_.Run(); |
2560 | 2559 |
2561 // It must fail. | 2560 // It must fail. |
2562 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2561 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); |
2563 } | 2562 } |
2564 | 2563 |
2565 } // namespace gdata | 2564 } // namespace gdata |
OLD | NEW |