| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |