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

Side by Side Diff: chrome/browser/extensions/api/discovery/suggested_links_registry.h

Issue 10388192: Initial unit tests for the discovery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 30 matching lines...) Expand all
41 // Maps extension id to a list of notifications for that extension. 41 // Maps extension id to a list of notifications for that extension.
42 typedef std::map<std::string, SuggestedLinkList> SuggestedLinksMap; 42 typedef std::map<std::string, SuggestedLinkList> SuggestedLinksMap;
43 43
44 virtual ~SuggestedLinksRegistry(); 44 virtual ~SuggestedLinksRegistry();
45 45
46 // Gets suggested links for a given extension id. 46 // Gets suggested links for a given extension id.
47 SuggestedLinkList& GetAllInternal(const std::string& extension_id); 47 SuggestedLinkList& GetAllInternal(const std::string& extension_id);
48 48
49 SuggestedLinksMap suggested_links_; 49 SuggestedLinksMap suggested_links_;
50 50
51 // An empty list of suggestions that can be returned for non-existing
52 // extensions.
53 SuggestedLinkList empty_list_;
54
51 DISALLOW_COPY_AND_ASSIGN(SuggestedLinksRegistry); 55 DISALLOW_COPY_AND_ASSIGN(SuggestedLinksRegistry);
52 }; 56 };
53 57
54 } // namespace extensions 58 } // namespace extensions
55 59
56 #endif // CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_ 60 #endif // CHROME_BROWSER_EXTENSIONS_API_DISCOVERY_SUGGESTED_LINKS_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698