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

Side by Side Diff: content/browser/renderer_host/pepper/quota_reservation.cc

Issue 100963005: [Pepper] Handle plugin crash on QuotaReservation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer_host/pepper/quota_reservation.h" 5 #include "content/browser/renderer_host/pepper/quota_reservation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "webkit/browser/fileapi/quota/open_file_handle.h" 10 #include "webkit/browser/fileapi/quota/open_file_handle.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 NOTREACHED(); 86 NOTREACHED();
87 } 87 }
88 88
89 quota_reservation_->RefreshReservation( 89 quota_reservation_->RefreshReservation(
90 amount, 90 amount,
91 base::Bind(&QuotaReservation::GotReservedQuota, 91 base::Bind(&QuotaReservation::GotReservedQuota,
92 this, 92 this,
93 callback)); 93 callback));
94 } 94 }
95 95
96 void QuotaReservation::OnClientCrash() {
97 quota_reservation_->OnClientCrash();
98 }
99
96 void QuotaReservation::GotReservedQuota( 100 void QuotaReservation::GotReservedQuota(
97 const ReserveQuotaCallback& callback, 101 const ReserveQuotaCallback& callback,
98 base::PlatformFileError error) { 102 base::PlatformFileError error) {
99 OffsetMap max_written_offsets; 103 OffsetMap max_written_offsets;
100 for (FileMap::iterator it = files_.begin(); it != files_.end(); ++ it) { 104 for (FileMap::iterator it = files_.begin(); it != files_.end(); ++ it) {
101 max_written_offsets.insert( 105 max_written_offsets.insert(
102 std::make_pair(it->first, it->second->base_file_size())); 106 std::make_pair(it->first, it->second->base_file_size()));
103 } 107 }
104 108
105 if (file_system_context_) { 109 if (file_system_context_) {
(...skipping 16 matching lines...) Expand all
122 file_system_context_->default_file_task_runner()->DeleteSoon( 126 file_system_context_->default_file_task_runner()->DeleteSoon(
123 FROM_HERE, 127 FROM_HERE,
124 this); 128 this);
125 } else { 129 } else {
126 // We're on the right thread to delete, or unit test. 130 // We're on the right thread to delete, or unit test.
127 delete this; 131 delete this;
128 } 132 }
129 } 133 }
130 134
131 } // namespace content 135 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698