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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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
« no previous file with comments | « chrome/browser/plugin_data_remover.h ('k') | chrome/browser/plugin_process_host.h » ('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.h" 5 #include "chrome/browser/plugin_data_remover.h"
6 6
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/version.h" 9 #include "base/version.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 UMA_HISTOGRAM_TIMES("ClearPluginData.time", 108 UMA_HISTOGRAM_TIMES("ClearPluginData.time",
109 base::Time::Now() - remove_start_time_); 109 base::Time::Now() - remove_start_time_);
110 SignalDone(); 110 SignalDone();
111 } 111 }
112 112
113 void PluginDataRemover::OnTimeout() { 113 void PluginDataRemover::OnTimeout() {
114 NOTREACHED() << "Timed out"; 114 NOTREACHED() << "Timed out";
115 SignalDone(); 115 SignalDone();
116 } 116 }
117 117
118 void PluginDataRemover::OnMessageReceived(const IPC::Message& msg) { 118 bool PluginDataRemover::OnMessageReceived(const IPC::Message& msg) {
119 IPC_BEGIN_MESSAGE_MAP(PluginDataRemover, msg) 119 IPC_BEGIN_MESSAGE_MAP(PluginDataRemover, msg)
120 IPC_MESSAGE_HANDLER(PluginHostMsg_ClearSiteDataResult, 120 IPC_MESSAGE_HANDLER(PluginHostMsg_ClearSiteDataResult,
121 OnClearSiteDataResult) 121 OnClearSiteDataResult)
122 IPC_MESSAGE_UNHANDLED_ERROR() 122 IPC_MESSAGE_UNHANDLED_ERROR()
123 IPC_END_MESSAGE_MAP() 123 IPC_END_MESSAGE_MAP()
124
125 return true;
124 } 126 }
125 127
126 void PluginDataRemover::OnChannelError() { 128 void PluginDataRemover::OnChannelError() {
127 LOG(DFATAL) << "Channel error"; 129 LOG(DFATAL) << "Channel error";
128 SignalDone(); 130 SignalDone();
129 } 131 }
130 132
131 void PluginDataRemover::SignalDone() { 133 void PluginDataRemover::SignalDone() {
132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 134 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
133 if (!is_removing_) 135 if (!is_removing_)
(...skipping 18 matching lines...) Expand all
152 &mime_type)) 154 &mime_type))
153 return false; 155 return false;
154 scoped_ptr<Version> version( 156 scoped_ptr<Version> version(
155 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version)); 157 webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
156 scoped_ptr<Version> min_version( 158 scoped_ptr<Version> min_version(
157 Version::GetVersionFromString(g_min_flash_version)); 159 Version::GetVersionFromString(g_min_flash_version));
158 return plugin.enabled && 160 return plugin.enabled &&
159 version.get() && 161 version.get() &&
160 min_version->CompareTo(*version) == -1; 162 min_version->CompareTo(*version) == -1;
161 } 163 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_data_remover.h ('k') | chrome/browser/plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698