summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-14 05:49:24 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-14 05:49:24 +0000
commit3aebfe0e2d969051727b56087c2bc9269d72a2f7 (patch)
tree0510eba7acbae0bea0eabaee5d4e206c6052eb65 /content/browser
parent8bc51f082653130aa6c1ac2f79b47bf038b2d300 (diff)
downloadchromium_src-3aebfe0e2d969051727b56087c2bc9269d72a2f7.zip
chromium_src-3aebfe0e2d969051727b56087c2bc9269d72a2f7.tar.gz
chromium_src-3aebfe0e2d969051727b56087c2bc9269d72a2f7.tar.bz2
[cleanup] STLDeleteContainerPointers->ScopedVector
R=sky@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/14701015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/site_instance_impl_unittest.cc6
-rw-r--r--content/browser/webui/web_ui_impl.cc2
-rw-r--r--content/browser/webui/web_ui_impl.h3
3 files changed, 4 insertions, 7 deletions
diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc
index fb322b1b..d98591c 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_unittest.cc
@@ -4,7 +4,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "base/stl_util.h"
+#include "base/memory/scoped_vector.h"
#include "base/string16.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/browsing_instance.h"
@@ -561,7 +561,7 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) {
// Make a bunch of mock renderers so that we hit the limit.
scoped_ptr<TestBrowserContext> browser_context(new TestBrowserContext());
- std::vector<MockRenderProcessHost*> hosts;
+ ScopedVector<MockRenderProcessHost> hosts;
for (size_t i = 0; i < kMaxRendererProcessCount; ++i)
hosts.push_back(new MockRenderProcessHost(browser_context.get()));
@@ -601,8 +601,6 @@ TEST_F(SiteInstanceTest, ProcessSharingByType) {
EXPECT_NE(webui1_instance->GetProcess(), hosts[i]);
}
- STLDeleteContainerPointers(hosts.begin(), hosts.end());
-
DrainMessageLoops();
}
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 88b181b..9f45481 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -5,7 +5,6 @@
#include "content/browser/webui/web_ui_impl.h"
#include "base/json/json_writer.h"
-#include "base/stl_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "content/browser/child_process_security_policy_impl.h"
@@ -55,7 +54,6 @@ WebUIImpl::~WebUIImpl() {
// Delete the controller first, since it may also be keeping a pointer to some
// of the handlers and can call them at destruction.
controller_.reset();
- STLDeleteContainerPointers(handlers_.begin(), handlers_.end());
}
// WebUIImpl, public: ----------------------------------------------------------
diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h
index 1be3674..de3059f 100644
--- a/content/browser/webui/web_ui_impl.h
+++ b/content/browser/webui/web_ui_impl.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/compiler_specific.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui.h"
#include "ipc/ipc_listener.h"
@@ -91,7 +92,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI,
// this page.
// The WebUIMessageHandlers we own.
- std::vector<WebUIMessageHandler*> handlers_;
+ ScopedVector<WebUIMessageHandler> handlers_;
// Non-owning pointer to the WebContents this WebUI is associated with.
WebContents* web_contents_;