[base] Make FilePathWatcher::Watch virtual so that it can be mocked.

TEST=./base_unittests


Review URL: http://codereview.chromium.org/9447066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123563 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 85109f5dfc11afbee9b1fa462152284967b6582e
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index 9c27ce4..3174a9e 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -91,7 +91,7 @@
   };
 
   FilePathWatcher();
-  ~FilePathWatcher();
+  virtual ~FilePathWatcher();
 
   // A callback that always cleans up the PlatformDelegate, either when executed
   // or when deleted without having been executed at all, as can happen during
@@ -102,7 +102,8 @@
   // back for each change. Returns true on success.
   // OnFilePathChanged() will be called on the same thread as Watch() is called,
   // which should have a MessageLoop of TYPE_IO.
-  bool Watch(const FilePath& path, Delegate* delegate) WARN_UNUSED_RESULT;
+  virtual bool Watch(const FilePath& path, Delegate* delegate)
+      WARN_UNUSED_RESULT;
 
  private:
   scoped_refptr<PlatformDelegate> impl_;