| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 // Cookie API implementation. | 5 // Cookie API implementation. |
| 6 | 6 |
| 7 #include "ceee/ie/broker/cookie_api_module.h" | 7 #include "ceee/ie/broker/cookie_api_module.h" |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 #include <atlcom.h> | 10 #include <atlcom.h> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 scoped_ptr<DictionaryValue> cookie(new DictionaryValue()); | 48 scoped_ptr<DictionaryValue> cookie(new DictionaryValue()); |
| 49 cookie->SetString(keys::kNameKey, com::ToString(cookie_info.name)); | 49 cookie->SetString(keys::kNameKey, com::ToString(cookie_info.name)); |
| 50 cookie->SetString(keys::kValueKey, com::ToString(cookie_info.value)); | 50 cookie->SetString(keys::kValueKey, com::ToString(cookie_info.value)); |
| 51 cookie->SetString(keys::kDomainKey, com::ToString(cookie_info.domain)); | 51 cookie->SetString(keys::kDomainKey, com::ToString(cookie_info.domain)); |
| 52 cookie->SetBoolean(keys::kHostOnlyKey, cookie_info.host_only == TRUE); | 52 cookie->SetBoolean(keys::kHostOnlyKey, cookie_info.host_only == TRUE); |
| 53 cookie->SetString(keys::kPathKey, com::ToString(cookie_info.path)); | 53 cookie->SetString(keys::kPathKey, com::ToString(cookie_info.path)); |
| 54 cookie->SetBoolean(keys::kSecureKey, cookie_info.secure == TRUE); | 54 cookie->SetBoolean(keys::kSecureKey, cookie_info.secure == TRUE); |
| 55 cookie->SetBoolean(keys::kHttpOnlyKey, cookie_info.http_only == TRUE); | 55 cookie->SetBoolean(keys::kHttpOnlyKey, cookie_info.http_only == TRUE); |
| 56 cookie->SetBoolean(keys::kSessionKey, cookie_info.session == TRUE); | 56 cookie->SetBoolean(keys::kSessionKey, cookie_info.session == TRUE); |
| 57 if (cookie_info.session == FALSE) | 57 if (cookie_info.session == FALSE) |
| 58 cookie->SetReal(keys::kExpirationDateKey, cookie_info.expiration_date); | 58 cookie->SetDouble(keys::kExpirationDateKey, cookie_info.expiration_date); |
| 59 cookie->SetString(keys::kStoreIdKey, com::ToString(cookie_info.store_id)); | 59 cookie->SetString(keys::kStoreIdKey, com::ToString(cookie_info.store_id)); |
| 60 DCHECK(value() == NULL); | 60 DCHECK(value() == NULL); |
| 61 set_value(cookie.release()); | 61 set_value(cookie.release()); |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool CookieApiResult::GetTabListForWindow(HWND window, | 65 bool CookieApiResult::GetTabListForWindow(HWND window, |
| 66 scoped_ptr<ListValue>* tab_list) { | 66 scoped_ptr<ListValue>* tab_list) { |
| 67 DCHECK(tab_list); | 67 DCHECK(tab_list); |
| 68 ApiDispatcher* dispatcher = GetDispatcher(); | 68 ApiDispatcher* dispatcher = GetDispatcher(); |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 CookieInfo::~CookieInfo() { | 575 CookieInfo::~CookieInfo() { |
| 576 // SysFreeString accepts NULL pointers. | 576 // SysFreeString accepts NULL pointers. |
| 577 ::SysFreeString(name); | 577 ::SysFreeString(name); |
| 578 ::SysFreeString(value); | 578 ::SysFreeString(value); |
| 579 ::SysFreeString(domain); | 579 ::SysFreeString(domain); |
| 580 ::SysFreeString(path); | 580 ::SysFreeString(path); |
| 581 ::SysFreeString(store_id); | 581 ::SysFreeString(store_id); |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace cookie_api | 584 } // namespace cookie_api |
| OLD | NEW |