summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 18:48:43 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 18:48:43 +0000
commitdfa46e5f7c326aeb31d242599c367e73b0d85770 (patch)
tree7851d0f7b052f49761b680dbb1aa13466e546f39 /chrome/browser/automation
parent8e982d9975c5fc763ad90282d827549b989f862f (diff)
downloadchromium_src-dfa46e5f7c326aeb31d242599c367e73b0d85770.zip
chromium_src-dfa46e5f7c326aeb31d242599c367e73b0d85770.tar.gz
chromium_src-dfa46e5f7c326aeb31d242599c367e73b0d85770.tar.bz2
The AutomationMsg_SetCookie IPC should be channeled to the automation cookie store for ChromeFrame. This
ensures that the automation client would receive a callback when the cookie is set on the store. Bug=none Review URL: http://codereview.chromium.org/403004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 22149c2..2b3b075 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1023,9 +1023,14 @@ void AutomationProvider::SetCookie(const GURL& url,
if (url.is_valid() && tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
+ scoped_refptr<URLRequestContextGetter> request_context =
+ tab->tab_contents()->request_context();
+ if (!request_context.get())
+ request_context = tab->profile()->GetRequestContext();
+
// Since we are running on the UI thread don't call GetURLRequestContext().
scoped_refptr<net::CookieStore> cookie_store =
- tab->profile()->GetRequestContext()->GetCookieStore();
+ request_context->GetCookieStore();
if (cookie_store->SetCookie(url, value))
*response_value = 1;