| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/network/cookie_store_impl.h" | 5 #include "mojo/services/network/cookie_store_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "mojo/common/url_type_converters.h" | 9 #include "mojo/common/url_type_converters.h" |
| 10 #include "mojo/services/network/network_context.h" | 10 #include "mojo/services/network/network_context.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 void AdaptSetCookieCallback(const Callback<void(bool)>& callback, | 22 void AdaptSetCookieCallback(const Callback<void(bool)>& callback, |
| 23 bool success) { | 23 bool success) { |
| 24 callback.Run(success); | 24 callback.Run(success); |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace | 27 } // namespace |
| 28 | 28 |
| 29 CookieStoreImpl::CookieStoreImpl(NetworkContext* context, | 29 CookieStoreImpl::CookieStoreImpl(NetworkContext* context, |
| 30 const GURL& origin, | 30 const GURL& origin, |
| 31 scoped_ptr<mojo::AppRefCount> app_refcount, | 31 scoped_ptr<mojo::MessageLoopRef> app_refcount, |
| 32 InterfaceRequest<CookieStore> request) | 32 InterfaceRequest<CookieStore> request) |
| 33 : context_(context), | 33 : context_(context), |
| 34 origin_(origin), | 34 origin_(origin), |
| 35 app_refcount_(std::move(app_refcount)), | 35 app_refcount_(std::move(app_refcount)), |
| 36 binding_(this, std::move(request)) {} | 36 binding_(this, std::move(request)) {} |
| 37 | 37 |
| 38 CookieStoreImpl::~CookieStoreImpl() { | 38 CookieStoreImpl::~CookieStoreImpl() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 void CookieStoreImpl::Get(const String& url, | 41 void CookieStoreImpl::Get(const String& url, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 62 return; | 62 return; |
| 63 } | 63 } |
| 64 store->SetCookieWithOptionsAsync( | 64 store->SetCookieWithOptionsAsync( |
| 65 url.To<GURL>(), | 65 url.To<GURL>(), |
| 66 cookie, | 66 cookie, |
| 67 net::CookieOptions(), | 67 net::CookieOptions(), |
| 68 base::Bind(&AdaptSetCookieCallback, callback)); | 68 base::Bind(&AdaptSetCookieCallback, callback)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace mojo | 71 } // namespace mojo |
| OLD | NEW |