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

Unified Diff: blimp/engine/app/blimp_engine_config.cc

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: Adds documentation 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
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | blimp/engine/app/blimp_engine_config_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/app/blimp_engine_config.cc
diff --git a/blimp/engine/app/blimp_engine_config.cc b/blimp/engine/app/blimp_engine_config.cc
index ecf9e11bf3ced50f7300cdd5e75c53d983833c5d..307e6b14fa8eff24515352fec55febbda5f5cb99 100644
--- a/blimp/engine/app/blimp_engine_config.cc
+++ b/blimp/engine/app/blimp_engine_config.cc
@@ -13,7 +13,7 @@
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
-#include "blimp/engine/app/switches.h"
+#include "blimp/common/get_client_token.h"
#include "cc/base/switches.h"
#include "content/public/common/content_switches.h"
#include "ui/gl/gl_switches.h"
@@ -22,20 +22,6 @@
namespace blimp {
namespace engine {
-namespace {
-// Gets the client token from the file provided by the command line. If a read
-// does not succeed, or the switch is malformed, an empty string is returned.
-std::string GetClientToken(const base::CommandLine& cmd_line) {
- std::string file_contents;
- const base::FilePath path = cmd_line.GetSwitchValuePath(kClientTokenPath);
- if (!base::ReadFileToString(path, &file_contents)) {
- LOG(ERROR) << "Could not read client token file at "
- << (path.empty() ? "(not provided)" : path.AsUTF8Unsafe());
- }
- return base::CollapseWhitespaceASCII(file_contents, true);
-}
-} // namespace
-
void SetCommandLineDefaults(base::CommandLine* command_line) {
command_line->AppendSwitch(::switches::kEnableOverlayScrollbar);
command_line->AppendSwitch(cc::switches::kDisableCachedPictureRaster);
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | blimp/engine/app/blimp_engine_config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698