OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_TEST_WEBDRIVER_COOKIE_H_ | |
6 #define CHROME_TEST_WEBDRIVER_COOKIE_H_ | |
7 | |
kkania
2011/01/28 23:25:59
#pragma once
Joe
2011/02/03 10:02:05
Done.
| |
8 #include <string> | |
9 #include "base/values.h" | |
10 | |
11 namespace webdriver { | |
12 | |
13 // Class used to conveniently convert cookies to various formats. | |
14 class Cookie { | |
15 public: | |
16 explicit Cookie(const std::string& cookie); | |
17 explicit Cookie(const DictionaryValue& dict); | |
18 | |
19 DictionaryValue* ToJSON(); | |
20 std::string ToJSONString(); | |
21 std::string ToString(); | |
22 | |
23 bool IsValid() { return valid_; } | |
24 const std::string get_name() { return name_; } | |
25 | |
26 private: | |
27 std::string name_; | |
28 std::string value_; | |
29 std::string path_; | |
30 std::string domain_; | |
31 std::string expires_; | |
32 bool secure_; | |
33 bool http_; | |
34 bool valid_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(Cookie); | |
37 }; | |
38 | |
39 } // namespace webdriver | |
40 | |
41 #endif // CHROME_TEST_WEBDRIVER_COOKIE_H_ | |
OLD | NEW |