Fix FullScreen crash in Webapp
[platform/framework/web/chromium-efl.git] / courgette / label_manager.cc
index a22a36c..5bbdd69 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -9,6 +9,8 @@
 
 #include <algorithm>
 
+#include "base/check.h"
+#include "base/check_op.h"
 #include "base/logging.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/numerics/safe_math.h"
@@ -113,17 +115,6 @@ Label* LabelManager::Find(RVA rva) {
   return it == labels_.end() || it->rva_ != rva ? nullptr : &(*it);
 }
 
-void LabelManager::RemoveUnderusedLabels(int32_t count_threshold) {
-  if (count_threshold <= 0)
-    return;
-  labels_.erase(std::remove_if(labels_.begin(), labels_.end(),
-                               [count_threshold](const Label& label) {
-                                 return label.count_ < count_threshold;
-                               }),
-                labels_.end());
-  // Not shrinking |labels_|, since this may cause reallocation.
-}
-
 void LabelManager::UnassignIndexes() {
   for (Label& label : labels_)
     label.index_ = Label::kNoIndex;