Index: chrome/test/webdriver/cookie.h |
diff --git a/chrome/test/webdriver/cookie.h b/chrome/test/webdriver/cookie.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b4616f5a936a49aee503e82b4543d590196de1d2 |
--- /dev/null |
+++ b/chrome/test/webdriver/cookie.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2010 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. |
+ |
+#pragma once |
kkania
2011/02/04 17:04:44
put this right after the #define
Joe
2011/02/09 06:32:10
See the pervious comment on pragma
On 2011/02/04 1
|
+#ifndef CHROME_TEST_WEBDRIVER_COOKIE_H_ |
+#define CHROME_TEST_WEBDRIVER_COOKIE_H_ |
+ |
+#include <string> |
+#include "base/values.h" |
+ |
+namespace webdriver { |
+ |
+// Class used to conveniently convert cookies to various formats. |
+class Cookie { |
+ public: |
+ explicit Cookie(const std::string& cookie); |
+ explicit Cookie(const DictionaryValue& dict); |
+ |
+ DictionaryValue* ToJSON(); |
+ std::string ToJSONString(); |
+ std::string ToString(); |
+ |
+ bool IsValid() { return valid_; } |
+ const std::string get_name() { return name_; } |
+ |
+ private: |
+ std::string name_; |
+ std::string value_; |
+ std::string path_; |
+ std::string domain_; |
+ std::string expires_; |
+ bool secure_; |
+ bool http_; |
+ bool valid_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(Cookie); |
+}; |
+ |
+} // namespace webdriver |
+ |
+#endif // CHROME_TEST_WEBDRIVER_COOKIE_H_ |