Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/chromeos/drive/file_system.h" 5 #include "chrome/browser/chromeos/drive/file_system.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 quit.Run(); 53 quit.Run();
54 } 54 }
55 55
56 // This class is used to record directory changes and examine them later. 56 // This class is used to record directory changes and examine them later.
57 class MockDirectoryChangeObserver : public FileSystemObserver { 57 class MockDirectoryChangeObserver : public FileSystemObserver {
58 public: 58 public:
59 MockDirectoryChangeObserver() {} 59 MockDirectoryChangeObserver() {}
60 virtual ~MockDirectoryChangeObserver() {} 60 virtual ~MockDirectoryChangeObserver() {}
61 61
62 // FileSystemObserver overrides. 62 // FileSystemObserver overrides.
63 virtual void OnDirectoryChanged( 63 virtual void OnDirectoryChanged(const base::FilePath& directory_path,
64 const base::FilePath& directory_path) OVERRIDE { 64 const FileChange* file_change) OVERRIDE {
65 changed_directories_.push_back(directory_path); 65 changed_directories_.push_back(directory_path);
66 } 66 }
67 67
68 const std::vector<base::FilePath>& changed_directories() const { 68 const std::vector<base::FilePath>& changed_directories() const {
69 return changed_directories_; 69 return changed_directories_;
70 } 70 }
71 71
72 private: 72 private:
73 std::vector<base::FilePath> changed_directories_; 73 std::vector<base::FilePath> changed_directories_;
74 DISALLOW_COPY_AND_ASSIGN(MockDirectoryChangeObserver); 74 DISALLOW_COPY_AND_ASSIGN(MockDirectoryChangeObserver);
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 kEmbedOrigin, 905 kEmbedOrigin,
906 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); 906 google_apis::test_util::CreateCopyResultCallback(&error, &share_url));
907 test_util::RunBlockingPoolTask(); 907 test_util::RunBlockingPoolTask();
908 908
909 // Verify the share url to the sharing dialog. 909 // Verify the share url to the sharing dialog.
910 EXPECT_EQ(FILE_ERROR_OK, error); 910 EXPECT_EQ(FILE_ERROR_OK, error);
911 EXPECT_TRUE(share_url.is_valid()); 911 EXPECT_TRUE(share_url.is_valid());
912 } 912 }
913 913
914 } // namespace drive 914 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698