Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: components/favicon/core/browser/favicon_handler.cc

Issue 983043003: Componentize FaviconService and FaviconHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon_service
Patch Set: Fix android_aosp (reverted the change by mistake by switching computer) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/favicon/core/browser/favicon_handler.cc
diff --git a/chrome/browser/favicon/favicon_handler.cc b/components/favicon/core/browser/favicon_handler.cc
similarity index 99%
rename from chrome/browser/favicon/favicon_handler.cc
rename to components/favicon/core/browser/favicon_handler.cc
index 9f1fe25c12408dcc9185f166dabb3de8c57f1cc8..1cff52c0ece0ddf9cc9f901c9eb7613ed9ebd21f 100644
--- a/chrome/browser/favicon/favicon_handler.cc
+++ b/components/favicon/core/browser/favicon_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/favicon/favicon_handler.h"
+#include "components/favicon/core/browser/favicon_handler.h"
#include <algorithm>
#include <cmath>
@@ -12,8 +12,8 @@
#include "base/bind_helpers.h"
#include "base/memory/ref_counted_memory.h"
#include "build/build_config.h"
-#include "chrome/browser/favicon/favicon_service.h"
#include "components/favicon/core/browser/favicon_client.h"
+#include "components/favicon/core/browser/favicon_service.h"
#include "components/favicon/core/favicon_driver.h"
#include "components/favicon_base/favicon_util.h"
#include "components/favicon_base/select_favicon_frames.h"
@@ -124,12 +124,12 @@ bool HasValidResult(
// Returns the index of the entry with the largest area.
int GetLargestSizeIndex(const std::vector<gfx::Size>& sizes) {
DCHECK(!sizes.empty());
- int ret = 0;
+ size_t ret = 0;
for (size_t i = 1; i < sizes.size(); ++i) {
if (sizes[ret].GetArea() < sizes[i].GetArea())
ret = i;
}
- return ret;
+ return static_cast<int>(ret);
}
// Return the index of a size which is same as the given |size|, -1 returned if
« no previous file with comments | « components/favicon/core/browser/favicon_handler.h ('k') | components/favicon/core/browser/favicon_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698