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
3 // found in the LICENSE file.
5 #ifndef MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_
6 #define MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_
8 #include "mojo/application/public/cpp/app_lifetime_helper.h"
9 #include "mojo/services/network/public/interfaces/cookie_store.mojom.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
16 class CookieStoreImpl
: public CookieStore
{
18 CookieStoreImpl(NetworkContext
* context
,
20 scoped_ptr
<mojo::AppRefCount
> app_refcount
,
21 InterfaceRequest
<CookieStore
> request
);
22 ~CookieStoreImpl() override
;
25 // CookieStore methods:
26 void Get(const String
& url
, const Callback
<void(String
)>& callback
) override
;
27 void Set(const String
& url
,
29 const Callback
<void(bool)>& callback
) override
;
31 NetworkContext
* context_
;
33 scoped_ptr
<mojo::AppRefCount
> app_refcount_
;
34 StrongBinding
<CookieStore
> binding_
;
36 DISALLOW_COPY_AND_ASSIGN(CookieStoreImpl
);
41 #endif // MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_