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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 GDATA_FILE_OK) | 321 GDATA_FILE_OK) |
322 << "Failed adding " | 322 << "Failed adding " |
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_->UpdateFromFeedForTesting( |
332 list, | 332 list, |
333 largest_changestamp, | 333 largest_changestamp, |
334 root_feed_changestamp_++) == GDATA_FILE_OK; | 334 root_feed_changestamp_++) == GDATA_FILE_OK; |
335 } | 335 } |
336 | 336 |
337 bool RemoveEntry(const FilePath& file_path) { | 337 bool RemoveEntry(const FilePath& file_path) { |
338 return file_system_->RemoveEntryFromFileSystem(file_path) == | 338 return file_system_->RemoveEntryFromFileSystem(file_path) == |
339 GDATA_FILE_OK; | 339 GDATA_FILE_OK; |
340 } | 340 } |
341 | 341 |
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2617 | 2617 |
2618 // Try to close the same file twice. | 2618 // Try to close the same file twice. |
2619 file_system_->CloseFile(kFileInRoot, close_file_callback); | 2619 file_system_->CloseFile(kFileInRoot, close_file_callback); |
2620 message_loop_.Run(); | 2620 message_loop_.Run(); |
2621 | 2621 |
2622 // It must fail. | 2622 // It must fail. |
2623 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2623 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); |
2624 } | 2624 } |
2625 | 2625 |
2626 } // namespace gdata | 2626 } // namespace gdata |
OLD | NEW |