OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "webkit/browser/fileapi/syncable/local_file_change_tracker.h" | 5 #include "webkit/browser/fileapi/syncable/local_file_change_tracker.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 protected: | 66 protected: |
67 FileSystemURL URL(const std::string& path) { | 67 FileSystemURL URL(const std::string& path) { |
68 return file_system_.URL(path); | 68 return file_system_.URL(path); |
69 } | 69 } |
70 | 70 |
71 FileSystemContext* file_system_context() { | 71 FileSystemContext* file_system_context() { |
72 return file_system_.file_system_context(); | 72 return file_system_.file_system_context(); |
73 } | 73 } |
74 | 74 |
75 LocalFileChangeTracker* change_tracker() { | 75 LocalFileChangeTracker* change_tracker() { |
76 return file_system_context()->change_tracker(); | 76 return file_system_.mount_provider()->change_tracker(); |
77 } | 77 } |
78 | 78 |
79 void VerifyAndClearChange(const FileSystemURL& url, | 79 void VerifyAndClearChange(const FileSystemURL& url, |
80 const FileChange& expected_change) { | 80 const FileChange& expected_change) { |
81 SCOPED_TRACE(testing::Message() << url.DebugString() << | 81 SCOPED_TRACE(testing::Message() << url.DebugString() << |
82 " expecting:" << expected_change.DebugString()); | 82 " expecting:" << expected_change.DebugString()); |
83 // Get the changes for URL and verify. | 83 // Get the changes for URL and verify. |
84 FileChangeList changes; | 84 FileChangeList changes; |
85 change_tracker()->GetChangesForURL(url, &changes); | 85 change_tracker()->GetChangesForURL(url, &changes); |
86 ASSERT_EQ(1U, changes.size()); | 86 ASSERT_EQ(1U, changes.size()); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 ASSERT_EQ(2U, urls_to_process.size()); | 595 ASSERT_EQ(2U, urls_to_process.size()); |
596 | 596 |
597 // The exact order of recursive removal cannot be determined. | 597 // The exact order of recursive removal cannot be determined. |
598 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || | 598 EXPECT_TRUE(URL(kPath1) == urls_to_process[0] || |
599 URL(kPath2) == urls_to_process[0]); | 599 URL(kPath2) == urls_to_process[0]); |
600 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || | 600 EXPECT_TRUE(URL(kPath1) == urls_to_process[1] || |
601 URL(kPath2) == urls_to_process[1]); | 601 URL(kPath2) == urls_to_process[1]); |
602 } | 602 } |
603 | 603 |
604 } // namespace sync_file_system | 604 } // namespace sync_file_system |
OLD | NEW |