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

Side by Side Diff: base/files/file_path_watcher.h

Issue 8520018: Add OVERRIDE to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extra header Created 9 years, 1 month 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
« no previous file with comments | « base/file_version_info_win.h ('k') | base/json/json_value_serializer.h » ('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) 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 // This module provides a way to monitor a file or directory for changes. 5 // This module provides a way to monitor a file or directory for changes.
6 6
7 #ifndef BASE_FILES_FILE_PATH_WATCHER_H_ 7 #ifndef BASE_FILES_FILE_PATH_WATCHER_H_
8 #define BASE_FILES_FILE_PATH_WATCHER_H_ 8 #define BASE_FILES_FILE_PATH_WATCHER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // A custom Task that always cleans up the PlatformDelegate, either when 54 // A custom Task that always cleans up the PlatformDelegate, either when
55 // executed or when deleted without having been executed at all, as can 55 // executed or when deleted without having been executed at all, as can
56 // happen during shutdown. 56 // happen during shutdown.
57 class CancelTask : public Task { 57 class CancelTask : public Task {
58 public: 58 public:
59 CancelTask(PlatformDelegate* delegate): delegate_(delegate) {} 59 CancelTask(PlatformDelegate* delegate): delegate_(delegate) {}
60 virtual ~CancelTask() { 60 virtual ~CancelTask() {
61 delegate_->CancelOnMessageLoopThread(); 61 delegate_->CancelOnMessageLoopThread();
62 } 62 }
63 63
64 virtual void Run() { 64 virtual void Run() OVERRIDE {
65 delegate_->CancelOnMessageLoopThread(); 65 delegate_->CancelOnMessageLoopThread();
66 } 66 }
67 private: 67 private:
68 scoped_refptr<PlatformDelegate> delegate_; 68 scoped_refptr<PlatformDelegate> delegate_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(CancelTask); 70 DISALLOW_COPY_AND_ASSIGN(CancelTask);
71 }; 71 };
72 72
73 // Used internally to encapsulate different members on different platforms. 73 // Used internally to encapsulate different members on different platforms.
74 class PlatformDelegate : public base::RefCountedThreadSafe<PlatformDelegate> { 74 class PlatformDelegate : public base::RefCountedThreadSafe<PlatformDelegate> {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 private: 120 private:
121 scoped_refptr<PlatformDelegate> impl_; 121 scoped_refptr<PlatformDelegate> impl_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(FilePathWatcher); 123 DISALLOW_COPY_AND_ASSIGN(FilePathWatcher);
124 }; 124 };
125 125
126 } // namespace files 126 } // namespace files
127 } // namespace base 127 } // namespace base
128 128
129 #endif // BASE_FILES_FILE_PATH_WATCHER_H_ 129 #endif // BASE_FILES_FILE_PATH_WATCHER_H_
OLDNEW
« no previous file with comments | « base/file_version_info_win.h ('k') | base/json/json_value_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698