summaryrefslogtreecommitdiffstats
path: root/chrome/browser/memory_purger.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:15:57 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:15:57 +0000
commit00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1 (patch)
treeeb61d6402a5e967e5eb1d41dfde730af48dfa55f /chrome/browser/memory_purger.cc
parentd9b888cdf9ad654a3f2e5c22b935e68db77a71ef (diff)
downloadchromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.zip
chromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.tar.gz
chromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.tar.bz2
Convert implicit scoped_refptr constructor calls to explicit ones, part 2
This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2826041 I then did quite a bit of manual editing to fix style issues. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4291001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64798 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/memory_purger.cc')
-rw-r--r--chrome/browser/memory_purger.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
index d1431da..3543ee5 100644
--- a/chrome/browser/memory_purger.cc
+++ b/chrome/browser/memory_purger.cc
@@ -37,7 +37,8 @@ class PurgeMemoryIOHelper
: safe_browsing_service_(safe_browsing_service) {
}
- void AddRequestContextGetter(URLRequestContextGetter* request_context_getter);
+ void AddRequestContextGetter(
+ scoped_refptr<URLRequestContextGetter> request_context_getter);
void PurgeMemoryOnIOThread();
@@ -52,11 +53,8 @@ class PurgeMemoryIOHelper
};
void PurgeMemoryIOHelper::AddRequestContextGetter(
- URLRequestContextGetter* request_context_getter) {
- if (!request_context_getters_.count(request_context_getter)) {
- request_context_getters_.insert(
- RequestContextGetter(request_context_getter));
- }
+ scoped_refptr<URLRequestContextGetter> request_context_getter) {
+ request_context_getters_.insert(request_context_getter);
}
void PurgeMemoryIOHelper::PurgeMemoryOnIOThread() {
@@ -104,7 +102,7 @@ void MemoryPurger::PurgeBrowser() {
i != profile_manager->end(); ++i) {
Profile* profile = *i;
purge_memory_io_helper->AddRequestContextGetter(
- profile->GetRequestContext());
+ make_scoped_refptr(profile->GetRequestContext()));
// NOTE: Some objects below may be duplicates across profiles. We could
// conceivably put all these in sets and then iterate over the sets.