| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 108 virtual void DeleteCookie(const GURL& url, |
| 109 const std::string& cookie_name) { | 109 const std::string& cookie_name) { |
| 110 return original_cookie_store_->DeleteCookie(url, cookie_name); | 110 return original_cookie_store_->DeleteCookie(url, cookie_name); |
| 111 } | 111 } |
| 112 | 112 |
| 113 virtual net::CookieMonster* GetCookieMonster() { |
| 114 return original_cookie_store_->GetCookieMonster(); |
| 115 } |
| 116 |
| 113 protected: | 117 protected: |
| 114 void SendIPCMessageOnIOThread(IPC::Message* m) { | 118 void SendIPCMessageOnIOThread(IPC::Message* m) { |
| 115 if (ChromeThread::CurrentlyOn(ChromeThread::IO)) { | 119 if (ChromeThread::CurrentlyOn(ChromeThread::IO)) { |
| 116 automation_client_->Send(m); | 120 automation_client_->Send(m); |
| 117 } else { | 121 } else { |
| 118 Task* task = NewRunnableMethod(this, | 122 Task* task = NewRunnableMethod(this, |
| 119 &AutomationCookieStore::SendIPCMessageOnIOThread, m); | 123 &AutomationCookieStore::SendIPCMessageOnIOThread, m); |
| 120 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, task); | 124 ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, task); |
| 121 } | 125 } |
| 122 } | 126 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 ChromeURLRequestContextGetter* request_context = | 176 ChromeURLRequestContextGetter* request_context = |
| 173 new ChromeURLRequestContextGetter( | 177 new ChromeURLRequestContextGetter( |
| 174 NULL, // Don't register an observer on PrefService. | 178 NULL, // Don't register an observer on PrefService. |
| 175 new Factory(original_context, profile, automation_client, | 179 new Factory(original_context, profile, automation_client, |
| 176 tab_handle)); | 180 tab_handle)); |
| 177 return request_context; | 181 return request_context; |
| 178 } | 182 } |
| 179 | 183 |
| 180 } // namespace AutomationRequestContext | 184 } // namespace AutomationRequestContext |
| 181 | 185 |
| OLD | NEW |