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:
Charles Kerr
2025-11-10 02:52:11 -06:00
committed by GitHub
parent 6399527761
commit 1073d7e2bb
2 changed files with 1 additions and 13 deletions

View File

@@ -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() {}
//

View File

@@ -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.