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

Side by Side Diff: remoting/host/config_file_watcher.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « remoting/host/branding.cc ('k') | remoting/host/config_file_watcher.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 #ifndef REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_ 5 #ifndef REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_
6 #define REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_ 6 #define REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 12
13 namespace base { 13 namespace base {
14 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
15 } // namespace base 15 } // namespace base
16 16
17 namespace remoting { 17 namespace remoting {
18 18
19 extern const char kHostConfigSwitchName[]; 19 extern const char kHostConfigSwitchName[];
20 extern const FilePath::CharType kDefaultHostConfigFile[]; 20 extern const base::FilePath::CharType kDefaultHostConfigFile[];
21 21
22 class ConfigFileWatcherImpl; 22 class ConfigFileWatcherImpl;
23 23
24 class ConfigFileWatcher { 24 class ConfigFileWatcher {
25 public: 25 public:
26 class Delegate { 26 class Delegate {
27 public: 27 public:
28 virtual ~Delegate(); 28 virtual ~Delegate();
29 29
30 // Called once after starting watching the configuration file and every time 30 // Called once after starting watching the configuration file and every time
31 // the file changes. 31 // the file changes.
32 virtual void OnConfigUpdated(const std::string& serialized_config) = 0; 32 virtual void OnConfigUpdated(const std::string& serialized_config) = 0;
33 33
34 // Called when the configuration file watcher encountered an error. 34 // Called when the configuration file watcher encountered an error.
35 virtual void OnConfigWatcherError() = 0; 35 virtual void OnConfigWatcherError() = 0;
36 }; 36 };
37 37
38 // Creates a configuration file watcher that lives at the |io_task_runner| 38 // Creates a configuration file watcher that lives at the |io_task_runner|
39 // thread but posts config file updates on on |main_task_runner|. 39 // thread but posts config file updates on on |main_task_runner|.
40 ConfigFileWatcher( 40 ConfigFileWatcher(
41 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 41 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
42 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 42 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
43 Delegate* delegate); 43 Delegate* delegate);
44 virtual ~ConfigFileWatcher(); 44 virtual ~ConfigFileWatcher();
45 45
46 // Starts watching |config_path|. 46 // Starts watching |config_path|.
47 void Watch(const FilePath& config_path); 47 void Watch(const base::FilePath& config_path);
48 48
49 private: 49 private:
50 scoped_refptr<ConfigFileWatcherImpl> impl_; 50 scoped_refptr<ConfigFileWatcherImpl> impl_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcher); 52 DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcher);
53 }; 53 };
54 54
55 } // namespace remoting 55 } // namespace remoting
56 56
57 #endif // REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_ 57 #endif // REMOTING_HOST_DAEMON_CONFIG_WATCHER_H_
OLDNEW
« no previous file with comments | « remoting/host/branding.cc ('k') | remoting/host/config_file_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698