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

content / public / browser / session_storage_usage_info.h [blame]

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_USAGE_INFO_H_
#define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_USAGE_INFO_H_

#include <tuple>

#include "content/common/content_export.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"

namespace content {

// Used to report Session Storage usage info by DOMStorageContext.
struct CONTENT_EXPORT SessionStorageUsageInfo {
  blink::StorageKey storage_key;
  std::string namespace_id;

  bool operator==(const SessionStorageUsageInfo& other) const {
    return std::tie(namespace_id, storage_key) ==
           std::tie(other.namespace_id, other.storage_key);
  }

  bool operator<(const SessionStorageUsageInfo& other) const {
    return std::tie(namespace_id, storage_key) <
           std::tie(other.namespace_id, other.storage_key);
  }
};

}  // namespace content

#endif  // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_USAGE_INFO_H_