Index: chrome/browser/extensions/consumer_id_factory.h |
diff --git a/chrome/browser/extensions/consumer_id_factory.h b/chrome/browser/extensions/consumer_id_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d345d41497dd140bb0402823777eac32b0157200 |
--- /dev/null |
+++ b/chrome/browser/extensions/consumer_id_factory.h |
@@ -0,0 +1,31 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ |
+#define CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ |
+ |
+#include <map> |
+ |
+#include "base/macros.h" |
+#include "chrome/browser/extensions/api/declarative_content/content_action.h" |
+#include "extensions/common/consumer.h" |
+ |
+using RequestContentScriptKey = extensions::RequestContentScript::RequestKey; |
+ |
+namespace extensions { |
+class RequestContentScript; |
+} |
+ |
+// A class that receives all kinds of input keys, convert them to |
+// ConsumerIDs and return back to API consumers. |
+class ConsumerIDFactory { |
+ public: |
+ 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
|
+ ConsumerID::HostType, |
+ ConsumerID::InstanceType); |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ConsumerIDFactory); |
+}; |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_CONSUMER_ID_FACTORY_H_ |