summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 22:18:52 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 22:18:52 +0000
commit85109f5dfc11afbee9b1fa462152284967b6582e (patch)
tree8593c7d25ee799af97ef10545b58e0eed10f2627 /base
parentb92e97b43fe827b7a8991b8d4ba54680cfddb7c9 (diff)
downloadchromium_src-85109f5dfc11afbee9b1fa462152284967b6582e.zip
chromium_src-85109f5dfc11afbee9b1fa462152284967b6582e.tar.gz
chromium_src-85109f5dfc11afbee9b1fa462152284967b6582e.tar.bz2
[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
Diffstat (limited to 'base')
-rw-r--r--base/files/file_path_watcher.h7
1 files changed, 4 insertions, 3 deletions
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 @@ class BASE_EXPORT FilePathWatcher {
};
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 @@ class BASE_EXPORT FilePathWatcher {
// 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_;