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

Side by Side Diff: extensions/common/extension_icon_set.h

Issue 448193002: Cleanup: Make ExtensionIconSet::Get return a const std::string& rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « extensions/browser/extension_icon_image.cc ('k') | extensions/common/extension_icon_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_
6 #define EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ 6 #define EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 30
31 // Remove all icons from the set. 31 // Remove all icons from the set.
32 void Clear(); 32 void Clear();
33 33
34 // Add an icon path to the set. If a path for the specified size is already 34 // Add an icon path to the set. If a path for the specified size is already
35 // present, it is overwritten. 35 // present, it is overwritten.
36 void Add(int size, const std::string& path); 36 void Add(int size, const std::string& path);
37 37
38 // Gets path value of the icon found when searching for |size| using 38 // Gets path value of the icon found when searching for |size| using
39 // |mathc_type|. 39 // |mathc_type|.
40 std::string Get(int size, MatchType match_type) const; 40 const std::string& Get(int size, MatchType match_type) const;
41 41
42 // Returns true iff the set contains the specified path. 42 // Returns true iff the set contains the specified path.
43 bool ContainsPath(const std::string& path) const; 43 bool ContainsPath(const std::string& path) const;
44 44
45 // Returns icon size if the set contains the specified path or 0 if not found. 45 // Returns icon size if the set contains the specified path or 0 if not found.
46 int GetIconSizeFromPath(const std::string& path) const; 46 int GetIconSizeFromPath(const std::string& path) const;
47 47
48 private: 48 private:
49 IconMap map_; 49 IconMap map_;
50 }; 50 };
51 51
52 #endif // EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_ 52 #endif // EXTENSIONS_COMMON_EXTENSION_ICON_SET_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_icon_image.cc ('k') | extensions/common/extension_icon_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698