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

Side by Side Diff: content/browser/plugin_data_remover_impl.cc

Issue 10891016: Remove all callers of Profile::GetResourceContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 "content/browser/plugin_data_remover_impl.h" 5 #include "content/browser/plugin_data_remover_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/sequenced_task_runner_helpers.h" 9 #include "base/sequenced_task_runner_helpers.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/version.h" 12 #include "base/version.h"
13 #include "content/browser/plugin_process_host.h" 13 #include "content/browser/plugin_process_host.h"
14 #include "content/browser/plugin_service_impl.h" 14 #include "content/browser/plugin_service_impl.h"
15 #include "content/browser/renderer_host/pepper/pepper_file_message_filter.h" 15 #include "content/browser/renderer_host/pepper/pepper_file_message_filter.h"
16 #include "content/common/child_process_host_impl.h" 16 #include "content/common/child_process_host_impl.h"
17 #include "content/common/plugin_messages.h" 17 #include "content/common/plugin_messages.h"
18 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/storage_partition.h"
20 #include "content/public/common/pepper_plugin_info.h" 21 #include "content/public/common/pepper_plugin_info.h"
21 #include "ppapi/proxy/ppapi_messages.h" 22 #include "ppapi/proxy/ppapi_messages.h"
22 #include "webkit/plugins/npapi/plugin_group.h" 23 #include "webkit/plugins/npapi/plugin_group.h"
23 24
24 namespace content { 25 namespace content {
25 26
26 namespace { 27 namespace {
27 28
28 const char kFlashMimeType[] = "application/x-shockwave-flash"; 29 const char kFlashMimeType[] = "application/x-shockwave-flash";
29 // The minimum Flash Player version that implements NPP_ClearSiteData. 30 // The minimum Flash Player version that implements NPP_ClearSiteData.
(...skipping 30 matching lines...) Expand all
60 public PpapiPluginProcessHost::BrokerClient, 61 public PpapiPluginProcessHost::BrokerClient,
61 public IPC::Listener, 62 public IPC::Listener,
62 public base::RefCountedThreadSafe<Context, 63 public base::RefCountedThreadSafe<Context,
63 BrowserThread::DeleteOnIOThread> { 64 BrowserThread::DeleteOnIOThread> {
64 public: 65 public:
65 Context(base::Time begin_time, BrowserContext* browser_context) 66 Context(base::Time begin_time, BrowserContext* browser_context)
66 : event_(new base::WaitableEvent(true, false)), 67 : event_(new base::WaitableEvent(true, false)),
67 begin_time_(begin_time), 68 begin_time_(begin_time),
68 is_removing_(false), 69 is_removing_(false),
69 browser_context_path_(browser_context->GetPath()), 70 browser_context_path_(browser_context->GetPath()),
70 resource_context_(browser_context->GetResourceContext()), 71 resource_context_(
72 content::BrowserContext::GetDefaultStoragePartition(browser_context) ->
73 GetResourceContext()),
71 channel_(NULL) { 74 channel_(NULL) {
72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
73 } 76 }
74 77
75 void Init(const std::string& mime_type) { 78 void Init(const std::string& mime_type) {
76 BrowserThread::PostTask( 79 BrowserThread::PostTask(
77 BrowserThread::IO, 80 BrowserThread::IO,
78 FROM_HERE, 81 FROM_HERE,
79 base::Bind(&Context::InitOnIOThread, this, mime_type)); 82 base::Bind(&Context::InitOnIOThread, this, mime_type));
80 BrowserThread::PostDelayedTask( 83 BrowserThread::PostDelayedTask(
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 305
303 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( 306 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving(
304 base::Time begin_time) { 307 base::Time begin_time) {
305 DCHECK(!context_.get()); 308 DCHECK(!context_.get());
306 context_ = new Context(begin_time, browser_context_); 309 context_ = new Context(begin_time, browser_context_);
307 context_->Init(mime_type_); 310 context_->Init(mime_type_);
308 return context_->event(); 311 return context_->event();
309 } 312 }
310 313
311 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/browser/plugin_service_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698