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

Unified Diff: main.cc

Issue 6874035: entd: require a per-entd-invocation session id in every request (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/entd.git@master
Patch Set: Allow a developer switch to disable session id' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « callback_server.cc ('k') | reference_extension/client.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
index 14c70a91abd62af90884faac1be9833cefca73ef..299ece75efdb5f015dd77bd7d00d938edbc8f12e 100644
--- a/main.cc
+++ b/main.cc
@@ -56,6 +56,8 @@ static const char *kLibcrosLocation = "libcros-location";
static const char *kCallbackOrigin = "callback-origin";
+static const char *kSessionId = "session-id";
+
} // namespace switches
// Return values:
@@ -164,6 +166,13 @@ int main(int argc, char** argv) {
entd::CallbackServer::required_origin;
}
+ if (cl->HasSwitch(switches::kSessionId)) {
+ entd::CallbackServer::set_session_id(cl->GetSwitchValueASCII(
+ switches::kSessionId));
+ LOG(INFO) << "Setting session id: " <<
+ entd::CallbackServer::session_id();
+ }
+
entd::Entd d;
d.Initialize();
« no previous file with comments | « callback_server.cc ('k') | reference_extension/client.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698