summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 22:43:43 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 22:43:43 +0000
commita965ca65e8170b3d685b7ca9185929fe3915b7f9 (patch)
tree0b4020409e9c79163bcd8e7bc6f35e624d4b4951 /chrome/common
parent5287c9bb1153016b2eff85fbcf7c06361bf72898 (diff)
downloadchromium_src-a965ca65e8170b3d685b7ca9185929fe3915b7f9.zip
chromium_src-a965ca65e8170b3d685b7ca9185929fe3915b7f9.tar.gz
chromium_src-a965ca65e8170b3d685b7ca9185929fe3915b7f9.tar.bz2
Revert 81158 due to memory bots - a Downloaded or retrieved favicon and touch in FaviconHelper.b.ViewHostMsg_UpdateFaviconURL can update multiple icon urlsBUG=71571TEST=Tested with existing unit test and add 2 new unit testsReview URL: http://codereview.chromium.org/6672065
TBR=michaelbai@google.com Review URL: http://codereview.chromium.org/6820054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/icon_messages.cc60
-rw-r--r--chrome/common/icon_messages.h57
-rw-r--r--chrome/common/render_messages.h5
3 files changed, 2 insertions, 120 deletions
diff --git a/chrome/common/icon_messages.cc b/chrome/common/icon_messages.cc
deleted file mode 100644
index 7648c14..0000000
--- a/chrome/common/icon_messages.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011 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/common/icon_messages.h"
-
-#include "content/common/common_param_traits.h"
-
-FaviconURL::FaviconURL()
- : icon_type(INVALID_ICON) {
-}
-
-FaviconURL::FaviconURL(const GURL& url, IconType type)
- : icon_url(url),
- icon_type(type) {
-}
-
-FaviconURL::~FaviconURL() {
-}
-
-namespace IPC {
-
-// static
-void ParamTraits<IconType>::Write(Message* m, const param_type& p) {
- m->WriteInt(p);
-}
-
-// static
-bool ParamTraits<IconType>::Read(const Message* m, void** iter, param_type* p) {
- int type;
- if (!m->ReadInt(iter, &type))
- return false;
- *p = static_cast<IconType>(type);
- return true;
-}
-
-// static
-void ParamTraits<IconType>::Log(const param_type& p, std::string* l) {
- l->append("IconType");
-}
-
-// static
-void ParamTraits<FaviconURL>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.icon_url);
- WriteParam(m, p.icon_type);
-}
-
-// static
-bool ParamTraits<FaviconURL>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return ReadParam(m, iter, &p->icon_url) && ReadParam(m, iter, &p->icon_type);
-}
-
-// static
-void ParamTraits<FaviconURL>::Log(const param_type& p, std::string* l) {
- l->append("<FaviconURL>");
-}
-
-} // namespace IPC
diff --git a/chrome/common/icon_messages.h b/chrome/common/icon_messages.h
deleted file mode 100644
index 47d4e9f..0000000
--- a/chrome/common/icon_messages.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2011 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.
-
-// Multiply-included message file, no traditional include guard.
-#include "googleurl/src/gurl.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_macros.h"
-#include "ipc/ipc_param_traits.h"
-
-// TODO : Pull ViewHostMsg_UpdateFaviconURL into this file
-
-#ifndef CHROME_COMMON_ICON_MESSAGES_H__
-#define CHROME_COMMON_ICON_MESSAGES_H__
-
-// The icon type in a page. The definition must be same as history::IconType.
-enum IconType {
- INVALID_ICON = 0x0,
- FAVICON = 1 << 0,
- TOUCH_ICON = 1 << 1,
- TOUCH_PRECOMPOSED_ICON = 1 << 2
-};
-
-// The favicon url from the render.
-struct FaviconURL {
- FaviconURL();
- FaviconURL(const GURL& url, IconType type);
- ~FaviconURL();
-
- // The url of the icon.
- GURL icon_url;
-
- // The type of the icon
- IconType icon_type;
-};
-
-namespace IPC {
-
-template <>
-struct ParamTraits<IconType> {
- typedef IconType param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<FaviconURL> {
- typedef FaviconURL param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-} // namespace IPC
-
-#endif // CHROME_COMMON_ICON_MESSAGES_H__
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index d417048..ba64142 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -18,7 +18,6 @@
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/common/content_settings.h"
-#include "chrome/common/icon_messages.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/nacl_types.h"
#include "chrome/common/prerender_constants.h"
@@ -335,10 +334,10 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_Thumbnail,
IPC_MESSAGE_ROUTED1(ViewHostMsg_Snapshot,
SkBitmap /* bitmap */)
-// Notification that the urls for the favicon of a site has been determined.
+// Notification that the url for the favicon of a site has been determined.
IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
int32 /* page_id */,
- std::vector<FaviconURL> /* urls of the favicon */)
+ GURL /* url of the favicon */)
// Following message is used to communicate the values received by the
// callback binding the JS to Cpp.