chore: enable check raw ptr fields (#38167)
This commit is contained in:
parent
141175c723
commit
3dbc0a365f
120 changed files with 298 additions and 185 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -36,7 +37,7 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
|||
bool RestartDevice(std::string* error_message) override;
|
||||
|
||||
private:
|
||||
content::BrowserContext* browser_context_;
|
||||
raw_ptr<content::BrowserContext> browser_context_;
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "extensions/browser/api/execute_code_function.h"
|
||||
#include "extensions/browser/extension_function.h"
|
||||
#include "extensions/common/extension_resource.h"
|
||||
|
@ -107,7 +108,7 @@ class TabsUpdateFunction : public ExtensionFunction {
|
|||
bool UpdateURL(const std::string& url, int tab_id, std::string* error);
|
||||
ResponseValue GetResult();
|
||||
|
||||
content::WebContents* web_contents_;
|
||||
raw_ptr<content::WebContents> web_contents_;
|
||||
|
||||
private:
|
||||
ResponseAction Run() override;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "extensions/browser/extension_registrar.h"
|
||||
|
@ -80,7 +81,7 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
|
|||
bool CanDisableExtension(const Extension* extension) override;
|
||||
bool ShouldBlockExtension(const Extension* extension) override;
|
||||
|
||||
content::BrowserContext* browser_context_; // Not owned.
|
||||
raw_ptr<content::BrowserContext> browser_context_; // Not owned.
|
||||
|
||||
// Registers and unregisters extensions.
|
||||
ExtensionRegistrar extension_registrar_;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/task/sequenced_task_runner_helpers.h"
|
||||
#include "content/public/browser/browser_message_filter.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
@ -63,7 +64,7 @@ class ElectronExtensionMessageFilter : public content::BrowserMessageFilter {
|
|||
// be accessed on the UI thread! Furthermore since this class is refcounted it
|
||||
// may outlive |browser_context_|, so make sure to NULL check if in doubt;
|
||||
// async calls and the like.
|
||||
content::BrowserContext* browser_context_;
|
||||
raw_ptr<content::BrowserContext> browser_context_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/one_shot_event.h"
|
||||
|
@ -92,7 +93,7 @@ class ElectronExtensionSystem : public ExtensionSystem {
|
|||
scoped_refptr<Extension> extension);
|
||||
void LoadComponentExtensions();
|
||||
|
||||
content::BrowserContext* browser_context_; // Not owned.
|
||||
raw_ptr<content::BrowserContext> browser_context_; // Not owned.
|
||||
|
||||
std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
|
||||
std::unique_ptr<QuotaService> quota_service_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue