Commit c1fa8b5b authored by Charlie Hu's avatar Charlie Hu Committed by Commit Bot

Remove unnecessary includes in feature_policy.h

base/containers/flat_set.h included in feature_policy.h also caused
flat_set being exposed and used in memory_managed_paint_canvas.h.
Replace the usage with WTF::HashSet as base/.. is a illegal path to
include in files under third_party.

Change-Id: If4bc800ea30b3fda4d6ab2554a21c8c6ebf14a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211908
Commit-Queue: Charlie Hu <chenleihu@google.com>
Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771903}
parent b13f3a96
......@@ -5,13 +5,9 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_FEATURE_POLICY_FEATURE_POLICY_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FEATURE_POLICY_FEATURE_POLICY_H_
#include <memory>
#include <utility>
#include <map>
#include <vector>
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "services/network/public/mojom/web_sandbox_flags.mojom-shared.h"
#include "third_party/blink/public/common/common_export.h"
......
......@@ -35,7 +35,7 @@ void MemoryManagedPaintCanvas::drawImageRect(
}
void MemoryManagedPaintCanvas::UpdateMemoryUsage(const cc::PaintImage& image) {
if (cached_image_ids_.contains(image.GetContentIdForFrame(0u)))
if (cached_image_ids_.Contains(image.GetContentIdForFrame(0u)))
return;
cached_image_ids_.insert(image.GetContentIdForFrame(0u));
......
......@@ -9,6 +9,7 @@
#include "cc/paint/record_paint_canvas.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"
namespace blink {
......@@ -38,7 +39,8 @@ class PLATFORM_EXPORT MemoryManagedPaintCanvas final
private:
void UpdateMemoryUsage(const cc::PaintImage& image);
base::flat_set<int> cached_image_ids_;
HashSet<int, DefaultHash<int>::Hash, WTF::UnsignedWithZeroKeyHashTraits<int>>
cached_image_ids_;
uint64_t total_stored_image_memory_ = 0;
base::RepeatingClosure set_needs_flush_callback_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment