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

Unified Diff: chrome/browser/favicon/favicon_util.cc

Issue 10765021: Make the id used in IconMsg_DownloadFavicon unique (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: chrome/browser/favicon/favicon_util.cc
diff --git a/chrome/browser/favicon/favicon_util.cc b/chrome/browser/favicon/favicon_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d1d8ede8b115b7251d52bfcb64d298606912f510
--- /dev/null
+++ b/chrome/browser/favicon/favicon_util.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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_util.h"
+
+#include "chrome/common/icon_messages.h"
+#include "content/public/browser/render_view_host.h"
+#include "googleurl/src/gurl.h"
+
+// static
+int FaviconUtil::DownloadFavicon(content::RenderViewHost* rvh,
+ GURL url,
+ int image_size) {
+ static int id = 1;
+ rvh->Send(new IconMsg_DownloadFavicon(rvh->GetRoutingID(), id++, url,
+ image_size));
stevenjb 2012/07/10 15:30:15 nit: align image_size with new
+ return id;
+}

Powered by Google App Engine
This is Rietveld 408576698