summaryrefslogtreecommitdiffstats
path: root/mojo/services/network/cookie_store_impl.h
blob: e3e9711caf72f74a48abc724732b8433bc85bd20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_
#define MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_

#include "mojo/services/network/public/interfaces/cookie_store.mojom.h"
#include "url/gurl.h"

namespace mojo {
class NetworkContext;

class CookieStoreImpl : public InterfaceImpl<CookieStore> {
 public:
  CookieStoreImpl(NetworkContext* context, const GURL& origin);
  ~CookieStoreImpl() override;

 private:
  // CookieStore methods:
  void Get(const String& url, const Callback<void(String)>& callback) override;
  void Set(const String& url,
           const String& cookie,
           const Callback<void(bool)>& callback) override;

  NetworkContext* context_;
  GURL origin_;

  DISALLOW_COPY_AND_ASSIGN(CookieStoreImpl);
};

}  // namespace mojo

#endif  // MOJO_SERVICES_NETWORK_COOKIE_STORE_IMPL_H_