Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_LARGE_ICON_URL_PARSER_H_ | |
| 6 #define CHROME_COMMON_FAVICON_LARGE_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 LargeIconUrlParser { | |
|
Roger McFarlane (Chromium)
2015/03/17 20:21:41
comment?
huangs
2015/03/18 18:01:48
Done.
| |
| 16 public: | |
| 17 LargeIconUrlParser(); | |
| 18 ~LargeIconUrlParser(); | |
| 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/large_icon_source.h". | |
| 28 bool Parse(const std::string& path); | |
| 29 | |
| 30 private: | |
| 31 | |
| 32 friend class LargeIconUrlParserTest; | |
| 33 | |
| 34 // The page URL string of the fallback icon is requested for. | |
|
beaudoin
2015/03/17 23:59:14
My natural language parser fails on this comment.
huangs
2015/03/18 18:01:48
Done. Also s/fallback/large/g.
| |
| 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 large icon is being requested is located. | |
| 42 size_t path_index_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(LargeIconUrlParser); | |
| 45 }; | |
| 46 | |
| 47 } // namespace chrome | |
| 48 | |
| 49 #endif // CHROME_COMMON_FAVICON_LARGE_ICON_URL_PARSER_H_ | |
| OLD | NEW |