Fix emulator build error
[platform/framework/web/chromium-efl.git] / components / permissions / permission_usage_session.cc
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/permissions/permission_usage_session.h"
6
7 #include <tuple>
8
9 namespace permissions {
10
11 bool PermissionUsageSession::operator==(
12     const PermissionUsageSession& other) const {
13   return std::tie(origin, type, usage_start, usage_end, had_user_activation,
14                   was_foreground, had_focus) ==
15          std::tie(other.origin, other.type, other.usage_start, other.usage_end,
16                   other.had_user_activation, other.was_foreground,
17                   other.had_focus);
18 }
19
20 bool PermissionUsageSession::operator!=(
21     const PermissionUsageSession& other) const {
22   return !(*this == other);
23 }
24
25 bool PermissionUsageSession::IsValid() const {
26   return !(origin.opaque() || usage_start.is_null() || usage_end.is_null() ||
27            usage_end < usage_start);
28 }
29
30 }  // namespace permissions