Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / mojo / services / network / cookie_store_impl.h
blob944818467d57197ddbc3d156a536428e4e2d7cbd
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"
11 #include "url/gurl.h"
13 namespace mojo {
14 class NetworkContext;
16 class CookieStoreImpl : public CookieStore {
17 public:
18 CookieStoreImpl(NetworkContext* context,
19 const GURL& origin,
20 scoped_ptr<mojo::AppRefCount> app_refcount,
21 InterfaceRequest<CookieStore> request);
22 ~CookieStoreImpl() override;
24 private:
25 // CookieStore methods:
26 void Get(const String& url, const Callback<void(String)>& callback) override;
27 void Set(const String& url,
28 const String& cookie,
29 const Callback<void(bool)>& callback) override;
31 NetworkContext* context_;
32 GURL origin_;
33 scoped_ptr<mojo::AppRefCount> app_refcount_;
34 StrongBinding<CookieStore> binding_;
36 DISALLOW_COPY_AND_ASSIGN(CookieStoreImpl);
39 } // namespace mojo
41 #endif // MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_