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

Side by Side Diff: chrome/common/mac/mock_launchd.h

Issue 1880143002: Convert chrome/common to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 | « chrome/common/logging_chrome.cc ('k') | chrome/common/mac/mock_launchd.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 CHROME_COMMON_MAC_MOCK_LAUNCHD_H_ 5 #ifndef CHROME_COMMON_MAC_MOCK_LAUNCHD_H_
6 #define CHROME_COMMON_MAC_MOCK_LAUNCHD_H_ 6 #define CHROME_COMMON_MAC_MOCK_LAUNCHD_H_
7 7
8 #include <launch.h> 8 #include <launch.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/mac/scoped_cftyperef.h" 14 #include "base/mac/scoped_cftyperef.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/common/mac/launchd.h" 15 #include "chrome/common/mac/launchd.h"
16 #include "chrome/common/multi_process_lock.h" 16 #include "chrome/common/multi_process_lock.h"
17 17
18 namespace base { 18 namespace base {
19 class MessageLoop; 19 class MessageLoop;
20 } 20 }
21 21
22 // TODO(dmaclach): Write this in terms of a real mock. 22 // TODO(dmaclach): Write this in terms of a real mock.
23 // http://crbug.com/76923 23 // http://crbug.com/76923
24 class MockLaunchd : public Launchd { 24 class MockLaunchd : public Launchd {
(...skipping 28 matching lines...) Expand all
53 bool restart_called() const { return restart_called_; } 53 bool restart_called() const { return restart_called_; }
54 bool remove_called() const { return remove_called_; } 54 bool remove_called() const { return remove_called_; }
55 bool checkin_called() const { return checkin_called_; } 55 bool checkin_called() const { return checkin_called_; }
56 bool write_called() const { return write_called_; } 56 bool write_called() const { return write_called_; }
57 bool delete_called() const { return delete_called_; } 57 bool delete_called() const { return delete_called_; }
58 58
59 private: 59 private:
60 base::FilePath file_; 60 base::FilePath file_;
61 std::string pipe_name_; 61 std::string pipe_name_;
62 base::MessageLoop* message_loop_; 62 base::MessageLoop* message_loop_;
63 scoped_ptr<MultiProcessLock> running_lock_; 63 std::unique_ptr<MultiProcessLock> running_lock_;
64 bool create_socket_; 64 bool create_socket_;
65 bool as_service_; 65 bool as_service_;
66 bool restart_called_; 66 bool restart_called_;
67 bool remove_called_; 67 bool remove_called_;
68 bool checkin_called_; 68 bool checkin_called_;
69 bool write_called_; 69 bool write_called_;
70 bool delete_called_; 70 bool delete_called_;
71 }; 71 };
72 72
73 #endif // CHROME_COMMON_MAC_MOCK_LAUNCHD_H_ 73 #endif // CHROME_COMMON_MAC_MOCK_LAUNCHD_H_
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/mac/mock_launchd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698