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

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

Issue 5579002: Add a preference to clear plugin data on browser shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 10 years 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
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/ui/browser.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/plugin_data_remover_helper.h" 5 #include "chrome/browser/plugin_data_remover_helper.h"
6 6
7 #include "base/ref_counted.h" 7 #include "base/ref_counted.h"
8 #include "chrome/browser/browser_thread.h" 8 #include "chrome/browser/browser_thread.h"
9 #include "chrome/browser/plugin_data_remover.h" 9 #include "chrome/browser/plugin_data_remover.h"
10 #include "chrome/common/notification_service.h" 10 #include "chrome/common/notification_service.h"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 14
15 // The internal class is refcounted so it can outlive PluginDataRemoverHelper.
15 class PluginDataRemoverHelper::Internal 16 class PluginDataRemoverHelper::Internal
16 : public base::RefCountedThreadSafe<PluginDataRemoverHelper::Internal> { 17 : public base::RefCountedThreadSafe<PluginDataRemoverHelper::Internal> {
17 public: 18 public:
18 explicit Internal(const char* pref_name, PrefService* prefs) 19 explicit Internal(const char* pref_name, PrefService* prefs)
19 : pref_name_(pref_name), prefs_(prefs) {} 20 : pref_name_(pref_name), prefs_(prefs) {}
20 21
21 void StartUpdate() { 22 void StartUpdate() {
22 BrowserThread::PostTask( 23 BrowserThread::PostTask(
23 BrowserThread::FILE, 24 BrowserThread::FILE,
24 FROM_HERE, 25 FROM_HERE,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 void PluginDataRemoverHelper::Observe(NotificationType type, 82 void PluginDataRemoverHelper::Observe(NotificationType type,
82 const NotificationSource& source, 83 const NotificationSource& source,
83 const NotificationDetails& details) { 84 const NotificationDetails& details) {
84 if (type.value == NotificationType::PLUGIN_ENABLE_STATUS_CHANGED) { 85 if (type.value == NotificationType::PLUGIN_ENABLE_STATUS_CHANGED) {
85 internal_->StartUpdate(); 86 internal_->StartUpdate();
86 } else { 87 } else {
87 NOTREACHED(); 88 NOTREACHED();
88 } 89 }
89 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698