mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
refactor: remove unused ExtensionActionAPI methods & fields (#48850)
refactor: remove unused method ExtensionActionAPI::GetExtensionPrefs()
refactor: remove unused field ExtensionActionAPI::browser_context_
refactor: remove unused field ExtensionActionAPI::browser_context_
looks like these were added in 5b105f91 but never used
This commit is contained in:
@@ -33,8 +33,7 @@ void ExtensionActionAPI::Observer::OnExtensionActionAPIShuttingDown() {}
|
||||
// ExtensionActionAPI
|
||||
//
|
||||
|
||||
ExtensionActionAPI::ExtensionActionAPI(content::BrowserContext* context)
|
||||
: browser_context_(context), extension_prefs_(nullptr) {}
|
||||
ExtensionActionAPI::ExtensionActionAPI(content::BrowserContext*) {}
|
||||
|
||||
// static
|
||||
BrowserContextKeyedAPIFactory<ExtensionActionAPI>*
|
||||
@@ -49,10 +48,6 @@ ExtensionActionAPI* ExtensionActionAPI::Get(content::BrowserContext* context) {
|
||||
return BrowserContextKeyedAPIFactory<ExtensionActionAPI>::Get(context);
|
||||
}
|
||||
|
||||
ExtensionPrefs* ExtensionActionAPI::GetExtensionPrefs() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ExtensionActionAPI::Shutdown() {}
|
||||
|
||||
//
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
|
||||
#define SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "extensions/browser/browser_context_keyed_api_factory.h"
|
||||
#include "extensions/browser/extension_action.h"
|
||||
#include "extensions/browser/extension_function.h"
|
||||
@@ -70,16 +69,10 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI {
|
||||
private:
|
||||
friend class BrowserContextKeyedAPIFactory<ExtensionActionAPI>;
|
||||
|
||||
ExtensionPrefs* GetExtensionPrefs();
|
||||
|
||||
// BrowserContextKeyedAPI implementation.
|
||||
void Shutdown() override;
|
||||
static const char* service_name() { return "ExtensionActionAPI"; }
|
||||
static const bool kServiceRedirectedInIncognito = true;
|
||||
|
||||
raw_ptr<content::BrowserContext> browser_context_;
|
||||
|
||||
raw_ptr<ExtensionPrefs> extension_prefs_;
|
||||
};
|
||||
|
||||
// Implementation of the browserAction and pageAction APIs.
|
||||
|
||||
Reference in New Issue
Block a user