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

Side by Side Diff: base/files/file_path_watcher_browsertest.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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
« no previous file with comments | « base/event_types.h ('k') | base/files/file_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/files/file_path_watcher.h" 5 #include "base/files/file_path_watcher.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <aclapi.h> 9 #include <aclapi.h>
10 #elif defined(OS_POSIX) 10 #elif defined(OS_POSIX)
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return collector_->Success(); 185 return collector_->Success();
186 } 186 }
187 187
188 NotificationCollector* collector() { return collector_.get(); } 188 NotificationCollector* collector() { return collector_.get(); }
189 189
190 MessageLoop loop_; 190 MessageLoop loop_;
191 base::Thread file_thread_; 191 base::Thread file_thread_;
192 ScopedTempDir temp_dir_; 192 ScopedTempDir temp_dir_;
193 scoped_refptr<NotificationCollector> collector_; 193 scoped_refptr<NotificationCollector> collector_;
194 194
195 private:
195 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherTest); 196 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherTest);
196 }; 197 };
197 198
198 bool FilePathWatcherTest::SetupWatch(const FilePath& target, 199 bool FilePathWatcherTest::SetupWatch(const FilePath& target,
199 FilePathWatcher* watcher, 200 FilePathWatcher* watcher,
200 TestDelegateBase* delegate, 201 TestDelegateBase* delegate,
201 bool recursive_watch) { 202 bool recursive_watch) {
202 base::WaitableEvent completion(false, false); 203 base::WaitableEvent completion(false, false);
203 bool result; 204 bool result;
204 file_thread_.message_loop_proxy()->PostTask( 205 file_thread_.message_loop_proxy()->PostTask(
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false)); 862 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, false));
862 ASSERT_TRUE(WaitForEvents()); 863 ASSERT_TRUE(WaitForEvents());
863 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true)); 864 ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true));
864 DeleteDelegateOnFileThread(delegate.release()); 865 DeleteDelegateOnFileThread(delegate.release());
865 } 866 }
866 867
867 #endif // OS_MACOSX 868 #endif // OS_MACOSX
868 } // namespace 869 } // namespace
869 870
870 } // namespace base 871 } // namespace base
OLDNEW
« no previous file with comments | « base/event_types.h ('k') | base/files/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698