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

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: Review fix. 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
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix_unittest.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) 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 26 matching lines...) Expand all
37 bool handled = true; 37 bool handled = true;
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 if (next_load_index_ == canonical_list_.size()) {
Robert Sesek 2012/01/31 23:16:51 nit: Add a comment referencing this bug.
James Hawkins 2012/01/31 23:28:22 Done.
Robert Sesek 2012/02/01 00:19:10 FYI this isn't on the latest patch set if you inte
48 canonical_list_.begin() + next_load_index_ + 1); 48 canonical_list_.clear();
49 } else {
50 canonical_list_.erase(canonical_list_.begin(),
51 canonical_list_.begin() + next_load_index_ + 1);
52 }
53
49 next_load_index_ = 0; 54 next_load_index_ = 0;
50 55
51 LoadPluginsInternal(); 56 LoadPluginsInternal();
52 } 57 }
53 58
54 bool PluginLoaderPosix::Send(IPC::Message* message) { 59 bool PluginLoaderPosix::Send(IPC::Message* message) {
55 if (process_host_) 60 if (process_host_)
56 return process_host_->Send(message); 61 return process_host_->Send(message);
57 return false; 62 return false;
58 } 63 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 179
175 PluginLoaderPosix::PendingCallback::PendingCallback( 180 PluginLoaderPosix::PendingCallback::PendingCallback(
176 scoped_refptr<base::MessageLoopProxy> loop, 181 scoped_refptr<base::MessageLoopProxy> loop,
177 const content::PluginService::GetPluginsCallback& cb) 182 const content::PluginService::GetPluginsCallback& cb)
178 : target_loop(loop), 183 : target_loop(loop),
179 callback(cb) { 184 callback(cb) {
180 } 185 }
181 186
182 PluginLoaderPosix::PendingCallback::~PendingCallback() { 187 PluginLoaderPosix::PendingCallback::~PendingCallback() {
183 } 188 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698