| OLD | NEW |
| 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 "content/browser/plugin_data_remover_impl.h" | 5 #include "content/browser/plugin_data_remover_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 public PpapiPluginProcessHost::BrokerClient, | 62 public PpapiPluginProcessHost::BrokerClient, |
| 63 public IPC::Listener, | 63 public IPC::Listener, |
| 64 public base::RefCountedThreadSafe<Context, | 64 public base::RefCountedThreadSafe<Context, |
| 65 BrowserThread::DeleteOnIOThread> { | 65 BrowserThread::DeleteOnIOThread> { |
| 66 public: | 66 public: |
| 67 Context(base::Time begin_time, BrowserContext* browser_context) | 67 Context(base::Time begin_time, BrowserContext* browser_context) |
| 68 : event_(new base::WaitableEvent(true, false)), | 68 : event_(new base::WaitableEvent(true, false)), |
| 69 begin_time_(begin_time), | 69 begin_time_(begin_time), |
| 70 is_removing_(false), | 70 is_removing_(false), |
| 71 browser_context_path_(browser_context->GetPath()), | 71 browser_context_path_(browser_context->GetPath()), |
| 72 resource_context_(browser_context->GetResourceContext()), | 72 resource_context_(browser_context->GetResourceContext()) { |
| 73 channel_(NULL) { | |
| 74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 73 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 75 } | 74 } |
| 76 | 75 |
| 77 void Init(const std::string& mime_type) { | 76 void Init(const std::string& mime_type) { |
| 78 BrowserThread::PostTask( | 77 BrowserThread::PostTask( |
| 79 BrowserThread::IO, | 78 BrowserThread::IO, |
| 80 FROM_HERE, | 79 FROM_HERE, |
| 81 base::Bind(&Context::InitOnIOThread, this, mime_type)); | 80 base::Bind(&Context::InitOnIOThread, this, mime_type)); |
| 82 BrowserThread::PostDelayedTask( | 81 BrowserThread::PostDelayedTask( |
| 83 BrowserThread::IO, | 82 BrowserThread::IO, |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 310 |
| 312 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( | 311 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( |
| 313 base::Time begin_time) { | 312 base::Time begin_time) { |
| 314 DCHECK(!context_.get()); | 313 DCHECK(!context_.get()); |
| 315 context_ = new Context(begin_time, browser_context_); | 314 context_ = new Context(begin_time, browser_context_); |
| 316 context_->Init(mime_type_); | 315 context_->Init(mime_type_); |
| 317 return context_->event(); | 316 return context_->event(); |
| 318 } | 317 } |
| 319 | 318 |
| 320 } // namespace content | 319 } // namespace content |
| OLD | NEW |