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

Side by Side Diff: chrome/common/favicon/big_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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_FAVICON_BIG_ICON_URL_PARSER_H_
6 #define CHROME_COMMON_FAVICON_BIG_ICON_URL_PARSER_H_
7
8 #include <string>
9
10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h"
12
13 namespace chrome {
14
15 class BigIconUrlParser {
Roger McFarlane (Chromium) 2015/03/16 19:00:59 BigIconUrl... taking the input URL in the construc
16 public:
17 BigIconUrlParser();
18 ~BigIconUrlParser();
19
20 std::string url_string() const { return url_string_; }
21
22 int size_in_pixels() const { return size_in_pixels_; }
23
24 size_t path_index() const { return path_index_; }
25
26 // Parses |path|, which should be in the format described at the top of the
27 // file "chrome/browser/ui/webui/big_icon_source.h".
28 bool Parse(const std::string& path);
29
30 private:
31
32 friend class BigIconUrlParserTest;
33
34 // The page URL string of the fallback icon is requested for.
35 std::string url_string_;
36
37 // The size of the requested fallback icon in pixels.
38 int size_in_pixels_;
39
40 // The index of the first character (relative to the path) where the the URL
41 // from which the big icon is being requested is located.
42 size_t path_index_;
43
44 DISALLOW_COPY_AND_ASSIGN(BigIconUrlParser);
45 };
46
47 } // namespace chrome
48
49 #endif // CHROME_COMMON_FAVICON_BIG_ICON_URL_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698