From 2eab429ff3e155567d7cb224453ab07ca37a615e Mon Sep 17 00:00:00 2001 From: treib Date: Tue, 2 Feb 2016 07:02:14 -0800 Subject: Extension cleanup (mostly includes) BUG=none TBRing trivial include changes TBR=derat@chromium.org TBR=benwells@chromium.org Review URL: https://codereview.chromium.org/1654043002 Cr-Commit-Position: refs/heads/master@{#372945} --- extensions/common/extension.cc | 3 ++- extensions/common/extension.h | 12 +----------- extensions/common/permissions/permissions_data.cc | 1 + 3 files changed, 4 insertions(+), 12 deletions(-) (limited to 'extensions/common') diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc index 3f7e43b..227cb7e 100644 --- a/extensions/common/extension.cc +++ b/extensions/common/extension.cc @@ -6,6 +6,7 @@ #include +#include #include #include "base/base64.h" @@ -383,7 +384,7 @@ Extension::ManifestData* Extension::GetManifestData(const std::string& key) void Extension::SetManifestData(const std::string& key, Extension::ManifestData* data) { DCHECK(!finished_parsing_manifest_ && thread_checker_.CalledOnValidThread()); - manifest_data_[key] = linked_ptr(data); + manifest_data_[key] = scoped_ptr(data); } Manifest::Location Extension::location() const { diff --git a/extensions/common/extension.h b/extensions/common/extension.h index df06d0f..13a86b7 100644 --- a/extensions/common/extension.h +++ b/extensions/common/extension.h @@ -5,27 +5,21 @@ #ifndef EXTENSIONS_COMMON_EXTENSION_H_ #define EXTENSIONS_COMMON_EXTENSION_H_ -#include -#include #include #include #include -#include #include -#include "base/containers/hash_tables.h" #include "base/files/file_path.h" #include "base/macros.h" #include "base/memory/linked_ptr.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/synchronization/lock.h" #include "base/threading/thread_checker.h" #include "extensions/common/extension_resource.h" #include "extensions/common/install_warning.h" #include "extensions/common/manifest.h" #include "extensions/common/url_pattern_set.h" -#include "ui/base/accelerators/accelerator.h" #include "url/gurl.h" #if !defined(ENABLE_EXTENSIONS) @@ -55,11 +49,6 @@ typedef std::string ExtensionId; // RuntimeData is protected by a lock. class Extension : public base::RefCountedThreadSafe { public: - struct ManifestData; - - typedef std::map > - ManifestDataMap; - enum State { DISABLED = 0, ENABLED, @@ -466,6 +455,7 @@ class Extension : public base::RefCountedThreadSafe { scoped_ptr manifest_; // Stored parsed manifest data. + using ManifestDataMap = std::map>; ManifestDataMap manifest_data_; // Set to true at the end of InitValue when initialization is finished. diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc index d3634d35..c77c4ee 100644 --- a/extensions/common/permissions/permissions_data.cc +++ b/extensions/common/permissions/permissions_data.cc @@ -4,6 +4,7 @@ #include "extensions/common/permissions/permissions_data.h" +#include #include #include "base/command_line.h" -- cgit v1.1