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

Unified Diff: chrome/common/favicon/fallback_icon_url_parser.h

Issue 1010783002: [Icons NTP] Working prototype to fetch, store, and display big icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaks and unit test fix. 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
« no previous file with comments | « chrome/browser/ui/webui/fallback_icon_source.cc ('k') | chrome/common/favicon/fallback_icon_url_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/favicon/fallback_icon_url_parser.h
diff --git a/chrome/common/favicon/fallback_icon_url_parser.h b/chrome/common/favicon/fallback_icon_url_parser.h
index 93d413908b833e4a4d3db77dc02751ab11cbc9e5..0e6afa9a2b58b975126967f76ef7eb174ba714f6 100644
--- a/chrome/common/favicon/fallback_icon_url_parser.h
+++ b/chrome/common/favicon/fallback_icon_url_parser.h
@@ -11,7 +11,6 @@
#include "base/macros.h"
#include "components/favicon_base/fallback_icon_style.h"
#include "third_party/skia/include/core/SkColor.h"
-#include "url/gurl.h"
namespace chrome {
@@ -20,12 +19,14 @@ class ParsedFallbackIconPath {
ParsedFallbackIconPath();
~ParsedFallbackIconPath();
- const GURL& url() const { return url_; }
+ const std::string& url_string() const { return url_string_; }
int size_in_pixels() const { return size_in_pixels_; }
const favicon_base::FallbackIconStyle& style() const { return style_; }
+ size_t path_index() const { return path_index_; }
+
// Parses |path|, which should be in the format described at the top of the
// file "chrome/browser/ui/webui/fallback_icon_source.h".
bool Parse(const std::string& path);
@@ -50,8 +51,8 @@ class ParsedFallbackIconPath {
FRIEND_TEST_ALL_PREFIXES(FallbackIconUrlParserTest, ParseSpecsFull);
FRIEND_TEST_ALL_PREFIXES(FallbackIconUrlParserTest, ParseSpecsFailure);
- // The page URL the fallback icon is requested for.
- GURL url_;
+ // The page URL string the fallback icon is requested for.
+ std::string url_string_;
// The size of the requested fallback icon in pixels.
int size_in_pixels_;
@@ -59,6 +60,10 @@ class ParsedFallbackIconPath {
// Styling specifications of fallback icon.
favicon_base::FallbackIconStyle style_;
+ // The index of the first character (relative to the path) where the the URL
+ // from which the fallback icon is being requested is located.
+ size_t path_index_;
+
DISALLOW_COPY_AND_ASSIGN(ParsedFallbackIconPath);
};
« no previous file with comments | « chrome/browser/ui/webui/fallback_icon_source.cc ('k') | chrome/common/favicon/fallback_icon_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698