summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authortreib <treib@chromium.org>2016-02-02 07:02:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-02 15:03:33 +0000
commit2eab429ff3e155567d7cb224453ab07ca37a615e (patch)
tree05e7fd63a732d8fb98a1531550dd612111528eff /extensions/common
parent74ab6df132d6d7ac4df473c6bdf47d35ba613ddd (diff)
downloadchromium_src-2eab429ff3e155567d7cb224453ab07ca37a615e.zip
chromium_src-2eab429ff3e155567d7cb224453ab07ca37a615e.tar.gz
chromium_src-2eab429ff3e155567d7cb224453ab07ca37a615e.tar.bz2
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}
Diffstat (limited to 'extensions/common')
-rw-r--r--extensions/common/extension.cc3
-rw-r--r--extensions/common/extension.h12
-rw-r--r--extensions/common/permissions/permissions_data.cc1
3 files changed, 4 insertions, 12 deletions
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 <stddef.h>
+#include <algorithm>
#include <utility>
#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<ManifestData>(data);
+ manifest_data_[key] = scoped_ptr<ManifestData>(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 <algorithm>
-#include <iosfwd>
#include <map>
#include <set>
#include <string>
-#include <utility>
#include <vector>
-#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<Extension> {
public:
- struct ManifestData;
-
- typedef std::map<const std::string, linked_ptr<ManifestData> >
- ManifestDataMap;
-
enum State {
DISABLED = 0,
ENABLED,
@@ -466,6 +455,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
scoped_ptr<Manifest> manifest_;
// Stored parsed manifest data.
+ using ManifestDataMap = std::map<std::string, scoped_ptr<ManifestData>>;
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 <algorithm>
#include <utility>
#include "base/command_line.h"