| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_util.h" | 5 #include "chrome/browser/automation/automation_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 *cookies = cookie_line; | 35 *cookies = cookie_line; |
| 36 event->Signal(); | 36 event->Signal(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void GetCookiesOnIOThread( | 39 void GetCookiesOnIOThread( |
| 40 const GURL& url, | 40 const GURL& url, |
| 41 const scoped_refptr<net::URLRequestContextGetter>& context_getter, | 41 const scoped_refptr<net::URLRequestContextGetter>& context_getter, |
| 42 base::WaitableEvent* event, | 42 base::WaitableEvent* event, |
| 43 std::string* cookies) { | 43 std::string* cookies) { |
| 44 context_getter->GetURLRequestContext()->cookie_store()-> | 44 context_getter->GetURLRequestContext()->cookie_store()-> |
| 45 GetCookiesAsync(url, | 45 GetCookiesWithOptionsAsync(url, net::CookieOptions(), |
| 46 base::Bind(&GetCookiesCallback, event, cookies)); | 46 base::Bind(&GetCookiesCallback, event, cookies)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void GetCanonicalCookiesCallback( | 49 void GetCanonicalCookiesCallback( |
| 50 base::WaitableEvent* event, | 50 base::WaitableEvent* event, |
| 51 net::CookieList* cookie_list, | 51 net::CookieList* cookie_list, |
| 52 const net::CookieList& cookies) { | 52 const net::CookieList& cookies) { |
| 53 *cookie_list = cookies; | 53 *cookie_list = cookies; |
| 54 event->Signal(); | 54 event->Signal(); |
| 55 } | 55 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 IPC::Message* message) { | 378 IPC::Message* message) { |
| 379 bool active = AppModalDialogQueue::GetInstance()->HasActiveDialog(); | 379 bool active = AppModalDialogQueue::GetInstance()->HasActiveDialog(); |
| 380 if (active) { | 380 if (active) { |
| 381 AutomationJSONReply(provider, message).SendError( | 381 AutomationJSONReply(provider, message).SendError( |
| 382 "Command cannot be performed because a modal dialog is active"); | 382 "Command cannot be performed because a modal dialog is active"); |
| 383 } | 383 } |
| 384 return active; | 384 return active; |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace automation_util | 387 } // namespace automation_util |
| OLD | NEW |