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

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

Issue 6793020: Move FilePathWatcher to base/files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: plugin_service only uses FPW on linux Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/file_path_watcher/file_path_watcher.h" 5 #include "base/files/file_path_watcher.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "base/win/object_watcher.h" 13 #include "base/win/object_watcher.h"
14 14
15 using ::base::files::FilePathWatcher;
16
15 namespace { 17 namespace {
16 18
17 class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate, 19 class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
18 public base::win::ObjectWatcher::Delegate, 20 public base::win::ObjectWatcher::Delegate,
19 public MessageLoop::DestructionObserver { 21 public MessageLoop::DestructionObserver {
20 public: 22 public:
21 FilePathWatcherImpl() : delegate_(NULL), handle_(INVALID_HANDLE_VALUE) {} 23 FilePathWatcherImpl() : delegate_(NULL), handle_(INVALID_HANDLE_VALUE) {}
22 24
23 // FilePathWatcher::PlatformDelegate overrides. 25 // FilePathWatcher::PlatformDelegate overrides.
24 virtual bool Watch(const FilePath& path, 26 virtual bool Watch(const FilePath& path,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 watcher_.StopWatching(); 267 watcher_.StopWatching();
266 FindCloseChangeNotification(handle_); 268 FindCloseChangeNotification(handle_);
267 handle_ = INVALID_HANDLE_VALUE; 269 handle_ = INVALID_HANDLE_VALUE;
268 } 270 }
269 271
270 } // namespace 272 } // namespace
271 273
272 FilePathWatcher::FilePathWatcher() { 274 FilePathWatcher::FilePathWatcher() {
273 impl_ = new FilePathWatcherImpl(); 275 impl_ = new FilePathWatcherImpl();
274 } 276 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698