Chromium Code Reviews| 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 std::string ToJSONString(); | |
|
John Grabowski
2011/02/14 21:59:06
Like.
Can you give a brief example in comments as
Joe
2011/02/15 02:30:48
Done.
| |
| 23 std::string ToString(); | |
| 24 | |
| 25 bool IsValid() const { return valid_; } | |
| 26 const std::string get_name() const { return name_; } | |
| 27 | |
| 28 private: | |
| 29 std::string name_; | |
| 30 std::string value_; | |
| 31 std::string path_; | |
| 32 std::string domain_; | |
| 33 std::string expires_; | |
| 34 bool secure_; | |
| 35 bool http_; | |
| 36 bool valid_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(Cookie); | |
| 39 }; | |
| 40 | |
| 41 } // namespace webdriver | |
| 42 | |
| 43 #endif // CHROME_TEST_WEBDRIVER_COOKIE_H_ | |
| OLD | NEW |