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

Side by Side Diff: components/favicon_base/large_icon_url_parser.h

Issue 2917733002: Remove unused chrome://large-icon (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « components/favicon_base/BUILD.gn ('k') | components/favicon_base/large_icon_url_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
6 #define COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
7
8 #include <stddef.h>
9
10 #include <string>
11
12 #include "base/macros.h"
13 #include "base/strings/string_piece.h"
14
15 // A parser for parameters to the chrome://large-icon/ host.
16 class LargeIconUrlParser {
17 public:
18 LargeIconUrlParser();
19 ~LargeIconUrlParser();
20
21 std::string url_string() const { return url_string_; }
22
23 int size_in_pixels() const { return size_in_pixels_; }
24
25 size_t path_index() const { return path_index_; }
26
27 // Parses |path|, which should be in the format described at the top of the
28 // file "chrome/browser/ui/webui/large_icon_source.h". Note that |path| does
29 // not have leading '/'.
30 bool Parse(base::StringPiece path);
31
32 private:
33 friend class LargeIconUrlParserTest;
34
35 // The page URL string of the requested large icon.
36 std::string url_string_;
37
38 // The size of the requested large icon in pixels.
39 int size_in_pixels_;
40
41 // The index of the first character (relative to the path) where the the URL
42 // from which the large icon is being requested is located.
43 size_t path_index_;
44
45 DISALLOW_COPY_AND_ASSIGN(LargeIconUrlParser);
46 };
47
48 #endif // COMPONENTS_FAVICON_BASE_LARGE_ICON_URL_PARSER_H_
OLDNEW
« no previous file with comments | « components/favicon_base/BUILD.gn ('k') | components/favicon_base/large_icon_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698