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 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/values.h" | |
12 | |
13 namespace webdriver { | |
14 | |
15 // Class used to convert cookies to various formats. | |
16 class Cookie { | |
17 public: | |
18 explicit Cookie(const std::string& cookie); | |
19 explicit Cookie(const DictionaryValue& dict); | |
20 | |
21 DictionaryValue* ToDictionary(); | |
22 // ToJSONString returns a string form of a JSON object with the required | |
John Grabowski
2011/02/15 03:39:56
ToJSONString() returns a ...
Joe
2011/02/15 21:39:26
Done.
| |
23 // WebDriver tags. Example { "name"="foo", "value"="bar"} | |
John Grabowski
2011/02/15 03:39:56
Can you use a valid Cookie as an example? Or docu
Joe
2011/02/15 21:39:26
The cookie is valid, it's a name value pair which
| |
24 std::string ToJSONString(); | |
25 // ToString returns a string format expected by chrome to for a cookie. | |
26 // Example: "foo=bar" | |
27 std::string ToString(); | |
28 | |
29 bool valid() const { return valid_; } | |
30 const std::string& name() const { return name_; } | |
31 | |
32 private: | |
33 std::string name_; | |
34 std::string value_; | |
35 std::string path_; | |
36 std::string domain_; | |
37 std::string expires_; | |
38 bool secure_; | |
39 bool http_; | |
40 bool valid_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(Cookie); | |
43 }; | |
44 | |
45 } // namespace webdriver | |
46 | |
47 #endif // CHROME_TEST_WEBDRIVER_COOKIE_H_ | |
OLD | NEW |