OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser/automation/automation_profile_impl.h" | 5 #include "chrome/browser/automation/automation_profile_impl.h" |
6 #include "chrome/browser/automation/automation_resource_message_filter.h" | 6 #include "chrome/browser/automation/automation_resource_message_filter.h" |
7 #include "chrome/browser/chrome_thread.h" | 7 #include "chrome/browser/chrome_thread.h" |
8 #include "chrome/browser/net/chrome_url_request_context.h" | 8 #include "chrome/browser/net/chrome_url_request_context.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
10 #include "net/url_request/url_request_context.h" | 10 #include "net/url_request/url_request_context.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 original_cookie_store_->SetCookiesWithOptions(url, cookies, options); | 98 original_cookie_store_->SetCookiesWithOptions(url, cookies, options); |
99 } | 99 } |
100 virtual std::string GetCookies(const GURL& url) { | 100 virtual std::string GetCookies(const GURL& url) { |
101 return original_cookie_store_->GetCookies(url); | 101 return original_cookie_store_->GetCookies(url); |
102 } | 102 } |
103 virtual std::string GetCookiesWithOptions(const GURL& url, | 103 virtual std::string GetCookiesWithOptions(const GURL& url, |
104 const net::CookieOptions& options) { | 104 const net::CookieOptions& options) { |
105 return original_cookie_store_->GetCookiesWithOptions(url, options); | 105 return original_cookie_store_->GetCookiesWithOptions(url, options); |
106 } | 106 } |
107 | 107 |
| 108 virtual void DeleteCookie(const GURL& url, |
| 109 const std::string& cookie_name) { |
| 110 return original_cookie_store_->DeleteCookie(url, cookie_name); |
| 111 } |
| 112 |
108 protected: | 113 protected: |
109 void SendIPCMessageOnIOThread(IPC::Message* m) { | 114 void SendIPCMessageOnIOThread(IPC::Message* m) { |
110 if (ChromeThread::CurrentlyOn(ChromeThread::IO)) { | 115 if (ChromeThread::CurrentlyOn(ChromeThread::IO)) { |
111 automation_client_->Send(m); | 116 automation_client_->Send(m); |
112 } else { | 117 } else { |
113 Task* task = NewRunnableMethod(this, | 118 Task* task = NewRunnableMethod(this, |
114 &AutomationCookieStore::SendIPCMessageOnIOThread, m); | 119 &AutomationCookieStore::SendIPCMessageOnIOThread, m); |
115 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, task); | 120 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, task); |
116 } | 121 } |
117 } | 122 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 ChromeURLRequestContextGetter* request_context = | 172 ChromeURLRequestContextGetter* request_context = |
168 new ChromeURLRequestContextGetter( | 173 new ChromeURLRequestContextGetter( |
169 NULL, // Don't register an observer on PrefService. | 174 NULL, // Don't register an observer on PrefService. |
170 new Factory(original_context, profile, automation_client, | 175 new Factory(original_context, profile, automation_client, |
171 tab_handle)); | 176 tab_handle)); |
172 return request_context; | 177 return request_context; |
173 } | 178 } |
174 | 179 |
175 } // namespace AutomationRequestContext | 180 } // namespace AutomationRequestContext |
176 | 181 |
OLD | NEW |