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

Unified Diff: callback_server.h

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 | « bin/entdwife.sh ('k') | callback_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: callback_server.h
diff --git a/callback_server.h b/callback_server.h
index 5bea1ddcde601fddbc4753695e40ff503fbab590..dfeb50a99dd6762cae68b7c1169bfc481bb9215a 100644
--- a/callback_server.h
+++ b/callback_server.h
@@ -55,14 +55,6 @@ class CallbackServer : public JSObjectWrapper<CallbackServer> {
return true;
}
- virtual std::string request_header_value() {
- return request_header_value_;
- }
-
- virtual void set_request_header_value(std::string value) {
- request_header_value_ = value;
- }
-
// Start the callback server with a particular set of callbacks and
// on a given port number.
virtual bool Start(v8::Handle<v8::Object> callbacks, int port);
@@ -88,6 +80,14 @@ class CallbackServer : public JSObjectWrapper<CallbackServer> {
};
virtual bool IsBusy() { return busy_; }
+ static void set_session_id(const std::string& session_id) {
+ session_id_ = session_id;
+ }
+
+ static std::string session_id() {
+ return session_id_;
+ }
+
static std::string required_origin;
private:
@@ -100,8 +100,8 @@ class CallbackServer : public JSObjectWrapper<CallbackServer> {
// JS Object containing the callback functions we might dispatch to.
v8::Persistent<v8::Object> callbacks_;
- // The value required in the X-Entd-Request header.
- std::string request_header_value_;
+ // X-Entd-Session-Id that must come in every request.
+ static std::string session_id_;
// Non-null if the server is running.
struct evhttp* evhttp_;
« no previous file with comments | « bin/entdwife.sh ('k') | callback_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698