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

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

Issue 9297049: PluginLoaderPosix: Fix an off by one error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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_loader_posix.h" 5 #include "content/browser/plugin_loader_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 27 matching lines...) Expand all
38 IPC_BEGIN_MESSAGE_MAP(PluginLoaderPosix, message) 38 IPC_BEGIN_MESSAGE_MAP(PluginLoaderPosix, message)
39 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadedPlugin, OnPluginLoaded) 39 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadedPlugin, OnPluginLoaded)
40 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadPluginFailed, OnPluginLoadFailed) 40 IPC_MESSAGE_HANDLER(UtilityHostMsg_LoadPluginFailed, OnPluginLoadFailed)
41 IPC_MESSAGE_UNHANDLED(handled = false) 41 IPC_MESSAGE_UNHANDLED(handled = false)
42 IPC_END_MESSAGE_MAP() 42 IPC_END_MESSAGE_MAP()
43 return handled; 43 return handled;
44 } 44 }
45 45
46 void PluginLoaderPosix::OnProcessCrashed(int exit_code) { 46 void PluginLoaderPosix::OnProcessCrashed(int exit_code) {
47 canonical_list_.erase(canonical_list_.begin(), 47 canonical_list_.erase(canonical_list_.begin(),
48 canonical_list_.begin() + next_load_index_ + 1); 48 canonical_list_.begin() + next_load_index_);
49 next_load_index_ = 0; 49 next_load_index_ = 0;
50 50
51 LoadPluginsInternal(); 51 LoadPluginsInternal();
52 } 52 }
53 53
54 bool PluginLoaderPosix::Send(IPC::Message* message) { 54 bool PluginLoaderPosix::Send(IPC::Message* message) {
55 if (process_host_) 55 if (process_host_)
56 return process_host_->Send(message); 56 return process_host_->Send(message);
57 return false; 57 return false;
58 } 58 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 PluginLoaderPosix::PendingCallback::PendingCallback( 175 PluginLoaderPosix::PendingCallback::PendingCallback(
176 scoped_refptr<base::MessageLoopProxy> loop, 176 scoped_refptr<base::MessageLoopProxy> loop,
177 const content::PluginService::GetPluginsCallback& cb) 177 const content::PluginService::GetPluginsCallback& cb)
178 : target_loop(loop), 178 : target_loop(loop),
179 callback(cb) { 179 callback(cb) {
180 } 180 }
181 181
182 PluginLoaderPosix::PendingCallback::~PendingCallback() { 182 PluginLoaderPosix::PendingCallback::~PendingCallback() {
183 } 183 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix_unittest.cc » ('j') | content/browser/plugin_loader_posix_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698