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

Unified Diff: chrome/browser/extensions/consumer_id_factory.h

Issue 822453002: Introduce HostID and de-couple Extensions from "script injection System" [browser side] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce ConsumerIDFactory Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698