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

Side by Side Diff: chrome/test/webdriver/cookie.cc

Issue 6903022: Removed wchar_t from Time::FromString (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed mistakes. Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/webdriver/cookie.h" 5 #include "chrome/test/webdriver/cookie.h"
6 6
7 #include <time.h> 7 #include <time.h>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 22 matching lines...) Expand all
33 if (pc.HasPath()) { 33 if (pc.HasPath()) {
34 path_ = pc.Path(); 34 path_ = pc.Path();
35 } 35 }
36 36
37 if (pc.HasDomain()) { 37 if (pc.HasDomain()) {
38 domain_ = pc.Domain(); 38 domain_ = pc.Domain();
39 } 39 }
40 40
41 if (pc.HasExpires()) { 41 if (pc.HasExpires()) {
42 base::Time parsed_time; 42 base::Time parsed_time;
43 if (base::Time::FromString(UTF8ToWide(pc.Expires()).c_str(), &parsed_time)) 43 if (base::Time::FromString(pc.Expires().c_str(), &parsed_time))
44 expiration_ = parsed_time; 44 expiration_ = parsed_time;
45 } 45 }
46 } 46 }
47 47
48 // Convert from a webdriver JSON representation of a cookie. 48 // Convert from a webdriver JSON representation of a cookie.
49 Cookie::Cookie(const DictionaryValue& dict) { 49 Cookie::Cookie(const DictionaryValue& dict) {
50 valid_ = false; 50 valid_ = false;
51 http_ = false; 51 http_ = false;
52 52
53 // Name and Value are required paramters. 53 // Name and Value are required paramters.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 cookie += " secure;"; 154 cookie += " secure;";
155 } 155 }
156 if (http_) { 156 if (http_) {
157 cookie += " http_only;"; 157 cookie += " http_only;";
158 } 158 }
159 159
160 return cookie; 160 return cookie;
161 } 161 }
162 162
163 } // namespace webdriver 163 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698