diff options
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index ebb57b0..5d663c6 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -442,79 +442,6 @@ END_MSG_MAP() return TRUE; } - virtual void OnSetCookieAsync(int tab_handle, const GURL& url, - const std::string& cookie) { - std::string name; - std::string data; - - size_t name_end = cookie.find('='); - if (std::string::npos != name_end) { - net::CookieMonster::ParsedCookie parsed_cookie = cookie; - name = parsed_cookie.Name(); - // Verify if the cookie is being deleted. The cookie format is as below - // value[; expires=date][; domain=domain][; path=path][; secure] - // If the first semicolon appears immediately after the name= string, - // it means that the cookie is being deleted, in which case we should - // pass the data as is to the InternetSetCookie function. - if (!parsed_cookie.Value().empty()) { - name.clear(); - data = cookie; - } else { - data = cookie.substr(name_end + 1); - } - } else { - data = cookie; - } - - int32 flags = INTERNET_COOKIE_EVALUATE_P3P; - - InternetCookieState cookie_state = static_cast<InternetCookieState>( - InternetSetCookieExA(url.spec().c_str(), name.c_str(), data.c_str(), - flags, NULL)); - - int32 cookie_action = MapCookieStateToCookieAction(cookie_state); - url_fetcher_.AddPrivacyDataForUrl(url.spec(), "", cookie_action); - } - - virtual void OnGetCookiesFromHost(int tab_handle, const GURL& url, - int cookie_id) { - DWORD cookie_size = 0; - bool success = true; - std::string cookie_string; - - int32 cookie_action = COOKIEACTION_READ; - BOOL result = InternetGetCookieA(url.spec().c_str(), NULL, NULL, - &cookie_size); - DWORD error = 0; - if (cookie_size) { - scoped_array<char> cookies(new char[cookie_size + 1]); - if (!InternetGetCookieA(url.spec().c_str(), NULL, cookies.get(), - &cookie_size)) { - success = false; - error = GetLastError(); - NOTREACHED() << "InternetGetCookie failed. Error: " << error; - } else { - cookie_string = cookies.get(); - } - } else { - success = false; - error = GetLastError(); - DLOG(INFO) << "InternetGetCookie failed. Error: " << error; - } - - if (automation_client_->automation_server()) { - automation_client_->automation_server()->Send( - new AutomationMsg_GetCookiesHostResponse(0, tab_handle, success, - url, cookie_string, - cookie_id)); - } - - if (!success && !error) - cookie_action = COOKIEACTION_SUPPRESS; - - url_fetcher_.AddPrivacyDataForUrl(url.spec(), "", cookie_action); - } - virtual void OnAttachExternalTab(int tab_handle, const IPC::AttachExternalTabParams& params) { std::string url; |