Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
Kevin M
2016/05/10 18:06:35
We should use the token testdata file, so this hel
CJ
2016/05/10 20:58:06
So, I should make the server test look more like t
Kevin M
2016/05/11 00:39:56
Yeah.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_COMMON_FAKE_COMMANDLINE_H_ | |
| 6 #define BLIMP_COMMON_FAKE_COMMANDLINE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/command_line.h" | |
| 12 #include "base/files/file_util.h" | |
| 13 #include "base/files/scoped_temp_dir.h" | |
| 14 #include "blimp/engine/app/switches.h" | |
| 15 | |
| 16 namespace blimp { | |
| 17 | |
| 18 // Creates a file in the temp directory for a given filepath switch. | |
| 19 void CreateFileForSwitch(const std::string& filepath_switch, | |
|
Kevin M
2016/05/10 18:06:34
We don't need to create a tmpfile (or have any sup
| |
| 20 const std::string& data); | |
| 21 | |
| 22 // Removes the associated file for a given filepath switch. | |
| 23 void RemoveFileForSwitch(const std::string& filepath_switch); | |
| 24 | |
| 25 // Creates and returns a CommandLine object with specified filepath switches. | |
| 26 base::CommandLine CreateCommandLine( | |
|
Kevin M
2016/05/10 18:06:35
This isn't necessary; look at the existing unit te
| |
| 27 const std::vector<std::string>& filepath_switches); | |
| 28 | |
| 29 base::FilePath GetFilepathForSwitch(const std::string& filepath_switch); | |
| 30 | |
| 31 const std::vector<std::string> all_filepath_switches_ = | |
|
Kevin M
2016/05/10 18:06:35
1. Non-POD (Plain Old Data) constants are disallow
| |
| 32 {engine::kClientTokenPath}; | |
|
Kevin M
2016/05/10 18:06:34
Brace initialization, while cool, isn't allowed ye
| |
| 33 | |
| 34 base::ScopedTempDir temp_dir_; | |
| 35 } // namespace blimp | |
| 36 | |
| 37 #endif // BLIMP_COMMON_FAKE_COMMANDLINE_H_ | |
| OLD | NEW |