Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chrome/browser/extensions/api/declarative_content/content_action.h" | |
| 12 #include "extensions/common/consumer.h" | |
| 13 | |
| 14 using RequestContentScriptKey = extensions::RequestContentScript::RequestKey; | |
| 15 | |
| 16 namespace extensions { | |
| 17 class RequestContentScript; | |
| 18 } | |
| 19 | |
| 20 // A class that receives all kinds of input keys, convert them to | |
| 21 // ConsumerIDs and return back to API consumers. | |
| 22 class ConsumerIDFactory { | |
| 23 public: | |
| 24 static const ConsumerID& Create(const RequestContentScriptKey& key, | |
|
Fady Samuel
2015/01/08 21:03:08
If you have a factory, it should not be possible t
Xi Han
2015/01/08 22:46:46
Remove this class, and move the map to RequstConte
| |
| 25 ConsumerID::HostType, | |
| 26 ConsumerID::InstanceType); | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(ConsumerIDFactory); | |
| 29 }; | |
| 30 | |
| 31 #endif // CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ | |
| OLD | NEW |