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

Unified Diff: chrome/common/favicon_url_parser.h

Issue 15388002: Supporting high dpi favicons in Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactoring after Kausalya's change Created 7 years, 6 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/common/favicon_url_parser.h
diff --git a/chrome/common/favicon_url_parser.h b/chrome/common/favicon_url_parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..8f785c1163b46cc720192a359204ab4a0dab3267
--- /dev/null
+++ b/chrome/common/favicon_url_parser.h
@@ -0,0 +1,33 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_COMMON_FAVICON_URL_PARSER_H_
+#define CHROME_COMMON_FAVICON_URL_PARSER_H_
+
+#include <string>
+
+#include "ui/base/layout.h"
+
+namespace chrome {
+
+// Parses |path|, which should be in the format described at the top of the
+// file "chrome/browser/ui/webui/favicon_source.h". Returns true if |path|
samarth 2013/06/14 21:54:46 Move the definition of the format here.
pedro (no code reviews) 2013/06/18 22:35:13 What do you mean? Do you mean moving the comment t
+// could be parsed. |supports_origin_parameter| indicates whether the origin
+// favicon parameter is supported (it won't be supported in Instant Extended).
+// |icon_types| indicates which icon types are supported. The |params| argument
+// will be set to the parameters part of the URL, allowing Instant Extended
+// to translate URLs containing such parameters (adding support of high dpi
+// favicons to Instant Extended).
+bool ParseFaviconPath(const std::string& path,
+ bool supports_origin_parameter,
+ int icon_types,
+ bool* is_icon_url,
+ std::string* url,
+ int* size_in_dip,
+ ui::ScaleFactor* scale_factor,
+ std::string* params);
+
+} // namespace chrome
+
+#endif // CHROME_COMMON_FAVICON_URL_PARSER_H_

Powered by Google App Engine
This is Rietveld 408576698