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

Side by Side Diff: content/browser/dom_storage/dom_storage_context_wrapper.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/dom_storage/dom_storage_context_wrapper.h" 5 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 context_ = new DOMStorageContextImpl( 276 context_ = new DOMStorageContextImpl(
277 data_path.empty() ? data_path 277 data_path.empty() ? data_path
278 : data_path.AppendASCII(kLocalStorageDirectory), 278 : data_path.AppendASCII(kLocalStorageDirectory),
279 data_path.empty() ? data_path 279 data_path.empty() ? data_path
280 : data_path.AppendASCII(kSessionStorageDirectory), 280 : data_path.AppendASCII(kSessionStorageDirectory),
281 special_storage_policy, 281 special_storage_policy,
282 new DOMStorageWorkerPoolTaskRunner( 282 new DOMStorageWorkerPoolTaskRunner(
283 worker_pool, 283 worker_pool,
284 worker_pool->GetNamedSequenceToken("dom_storage_primary"), 284 worker_pool->GetNamedSequenceToken("dom_storage_primary"),
285 worker_pool->GetNamedSequenceToken("dom_storage_commit"), 285 worker_pool->GetNamedSequenceToken("dom_storage_commit"),
286 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO) 286 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get()));
287 .get()));
288 287
289 memory_pressure_listener_.reset(new base::MemoryPressureListener( 288 memory_pressure_listener_.reset(new base::MemoryPressureListener(
290 base::Bind(&DOMStorageContextWrapper::OnMemoryPressure, this))); 289 base::Bind(&DOMStorageContextWrapper::OnMemoryPressure, this)));
291 } 290 }
292 291
293 DOMStorageContextWrapper::~DOMStorageContextWrapper() {} 292 DOMStorageContextWrapper::~DOMStorageContextWrapper() {}
294 293
295 void DOMStorageContextWrapper::GetLocalStorageUsage( 294 void DOMStorageContextWrapper::GetLocalStorageUsage(
296 const GetLocalStorageUsageCallback& callback) { 295 const GetLocalStorageUsageCallback& callback) {
297 DCHECK(context_.get()); 296 DCHECK(context_.get());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 if (memory_pressure_level == 390 if (memory_pressure_level ==
392 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) { 391 base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) {
393 purge_option = DOMStorageContextImpl::PURGE_AGGRESSIVE; 392 purge_option = DOMStorageContextImpl::PURGE_AGGRESSIVE;
394 } 393 }
395 context_->task_runner()->PostTask( 394 context_->task_runner()->PostTask(
396 FROM_HERE, 395 FROM_HERE,
397 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option)); 396 base::Bind(&DOMStorageContextImpl::PurgeMemory, context_, purge_option));
398 } 397 }
399 398
400 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698