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

Side by Side Diff: remoting/host/config_file_watcher_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 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
« no previous file with comments | « remoting/host/config_file_watcher.cc ('k') | remoting/host/continue_window_chromeos.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "remoting/host/config_file_watcher.h" 5 #include "remoting/host/config_file_watcher.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 protected: 52 protected:
53 base::MessageLoopForUI message_loop_; 53 base::MessageLoopForUI message_loop_;
54 base::RunLoop run_loop_; 54 base::RunLoop run_loop_;
55 55
56 ConfigFileWatcherDelegate delegate_; 56 ConfigFileWatcherDelegate delegate_;
57 57
58 // Path to the configuration file used. 58 // Path to the configuration file used.
59 base::FilePath config_file_; 59 base::FilePath config_file_;
60 60
61 // The configuration file watcher that is being tested. 61 // The configuration file watcher that is being tested.
62 scoped_ptr<ConfigFileWatcher> watcher_; 62 std::unique_ptr<ConfigFileWatcher> watcher_;
63 }; 63 };
64 64
65 ConfigFileWatcherTest::ConfigFileWatcherTest() { 65 ConfigFileWatcherTest::ConfigFileWatcherTest() {
66 } 66 }
67 67
68 ConfigFileWatcherTest::~ConfigFileWatcherTest() { 68 ConfigFileWatcherTest::~ConfigFileWatcherTest() {
69 } 69 }
70 70
71 void ConfigFileWatcherTest::StopWatcher() { 71 void ConfigFileWatcherTest::StopWatcher() {
72 watcher_.reset(); 72 watcher_.reset();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Modify the watched file. 127 // Modify the watched file.
128 std::string data("test"); 128 std::string data("test");
129 EXPECT_NE(base::WriteFile(config_file_, data.c_str(), 129 EXPECT_NE(base::WriteFile(config_file_, data.c_str(),
130 static_cast<int>(data.size())), -1); 130 static_cast<int>(data.size())), -1);
131 131
132 run_loop_.Run(); 132 run_loop_.Run();
133 } 133 }
134 134
135 } // namespace remoting 135 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/config_file_watcher.cc ('k') | remoting/host/continue_window_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698