summaryrefslogtreecommitdiffstats
path: root/components/html_viewer/web_storage_namespace_impl.cc
blob: f61a63f02f3959a185c684e19f1644e5268fd82f (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
35
36
37
38
39
40
41
// 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.

#include "components/html_viewer/web_storage_namespace_impl.h"

#include <stdio.h>

#include "third_party/WebKit/public/platform/WebStorageArea.h"

namespace html_viewer {
namespace {

class DummyWebStorageAreaImpl : public blink::WebStorageArea {
 public:
  unsigned length() override { return 0; }
  blink::WebString key(unsigned index) override { return blink::WebString(); }
  blink::WebString getItem(const blink::WebString& key) override {
    return blink::WebString();
  }
};

}  // namespace

WebStorageNamespaceImpl::WebStorageNamespaceImpl() {
}

WebStorageNamespaceImpl::~WebStorageNamespaceImpl() {
}

blink::WebStorageArea* WebStorageNamespaceImpl::createStorageArea(
    const blink::WebString& origin) {
  return new DummyWebStorageAreaImpl();
}

bool WebStorageNamespaceImpl::isSameNamespace(
    const blink::WebStorageNamespace&) const {
  return false;
}

}  // namespace html_viewer