Chromium Code Reviews| Index: blimp/common/fake_commandline.h |
| diff --git a/blimp/common/fake_commandline.h b/blimp/common/fake_commandline.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3d436587966b3f136e9a919cd6bacd4065c49606 |
| --- /dev/null |
| +++ b/blimp/common/fake_commandline.h |
| @@ -0,0 +1,37 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_COMMON_FAKE_COMMANDLINE_H_ |
| +#define BLIMP_COMMON_FAKE_COMMANDLINE_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/command_line.h" |
| +#include "base/files/file_util.h" |
| +#include "base/files/scoped_temp_dir.h" |
| +#include "blimp/engine/app/switches.h" |
| + |
| +namespace blimp { |
| + |
| +// Creates a file in the temp directory for a given filepath switch. |
| +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
|
| + const std::string& data); |
| + |
| +// Removes the associated file for a given filepath switch. |
| +void RemoveFileForSwitch(const std::string& filepath_switch); |
| + |
| +// Creates and returns a CommandLine object with specified filepath switches. |
| +base::CommandLine CreateCommandLine( |
|
Kevin M
2016/05/10 18:06:35
This isn't necessary; look at the existing unit te
|
| + const std::vector<std::string>& filepath_switches); |
| + |
| +base::FilePath GetFilepathForSwitch(const std::string& filepath_switch); |
| + |
| +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
|
| +{engine::kClientTokenPath}; |
|
Kevin M
2016/05/10 18:06:34
Brace initialization, while cool, isn't allowed ye
|
| + |
| +base::ScopedTempDir temp_dir_; |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_COMMON_FAKE_COMMANDLINE_H_ |