Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome/browser/memory_purger.cc

Issue 9867002: Fix link error when safe browsing is disabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minimised #ifdefs Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/memory_purger.h" 5 #include "chrome/browser/memory_purger.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 void PurgeMemoryIOHelper::PurgeMemoryOnIOThread() { 62 void PurgeMemoryIOHelper::PurgeMemoryOnIOThread() {
63 // Ask ProxyServices to purge any memory they can (generally garbage in the 63 // Ask ProxyServices to purge any memory they can (generally garbage in the
64 // wrapped ProxyResolver's JS engine). 64 // wrapped ProxyResolver's JS engine).
65 for (size_t i = 0; i < request_context_getters_.size(); ++i) { 65 for (size_t i = 0; i < request_context_getters_.size(); ++i) {
66 request_context_getters_[i]->GetURLRequestContext()->proxy_service()-> 66 request_context_getters_[i]->GetURLRequestContext()->proxy_service()->
67 PurgeMemory(); 67 PurgeMemory();
68 } 68 }
69 69
70 #if defined(ENABLE_SAFE_BROWSING)
70 safe_browsing_service_->PurgeMemory(); 71 safe_browsing_service_->PurgeMemory();
72 #endif
71 } 73 }
72 74
73 // ----------------------------------------------------------------------------- 75 // -----------------------------------------------------------------------------
74 76
75 // static 77 // static
76 void MemoryPurger::PurgeAll() { 78 void MemoryPurger::PurgeAll() {
77 PurgeBrowser(); 79 PurgeBrowser();
78 PurgeRenderers(); 80 PurgeRenderers();
79 81
80 // TODO(pkasting): 82 // TODO(pkasting):
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 content::RenderProcessHost::AllHostsIterator()); 148 content::RenderProcessHost::AllHostsIterator());
147 !i.IsAtEnd(); i.Advance()) 149 !i.IsAtEnd(); i.Advance())
148 PurgeRendererForHost(i.GetCurrentValue()); 150 PurgeRendererForHost(i.GetCurrentValue());
149 } 151 }
150 152
151 // static 153 // static
152 void MemoryPurger::PurgeRendererForHost(content::RenderProcessHost* host) { 154 void MemoryPurger::PurgeRendererForHost(content::RenderProcessHost* host) {
153 // Direct the renderer to free everything it can. 155 // Direct the renderer to free everything it can.
154 host->Send(new ChromeViewMsg_PurgeMemory()); 156 host->Send(new ChromeViewMsg_PurgeMemory());
155 } 157 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698