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

Unified Diff: blimp/common/fake_commandline.h

Issue 1958033003: Allows client to access auth token from command line specified file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed kmarshall's comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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..ec37ded6a77fd5b1f0498665b5a6d0a56b1eafc2
--- /dev/null
+++ b/blimp/common/fake_commandline.h
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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/common/switches.h"
+
+namespace blimp {
+
+// Creates a file in the temp directory for a given filepath switch.
+void CreateFileForSwitch(const std::string& filepath_switch,
+ 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(
+ const std::vector<std::string>& filepath_switches);
+
+base::FilePath GetFilepathForSwitch(const std::string& filepath_switch);
+
+const std::vector<std::string> all_filepath_switches_ =
+{engine::kClientTokenPath};
+
+base::ScopedTempDir temp_dir_;
+} // namespace blimp
+
+#endif // BLIMP_COMMON_FAKE_COMMANDLINE_H_

Powered by Google App Engine
This is Rietveld 408576698