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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/throttled_file_system.cc

Issue 957983002: Change DCHECKs to CHECKs to investigate a crash when aborting in Files app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. Created 5 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
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/queue.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/file_system_provider/throttled_file_system.h" 5 #include "chrome/browser/chromeos/file_system_provider/throttled_file_system.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 210
211 void ThrottledFileSystem::OnCloseFileCompleted( 211 void ThrottledFileSystem::OnCloseFileCompleted(
212 int file_handle, 212 int file_handle,
213 const storage::AsyncFileUtil::StatusCallback& callback, 213 const storage::AsyncFileUtil::StatusCallback& callback,
214 base::File::Error result) { 214 base::File::Error result) {
215 // Closing is always final. Even if an error happened, the file is considered 215 // Closing is always final. Even if an error happened, the file is considered
216 // closed on the C++ side. Release the task from the queue, so other files 216 // closed on the C++ side. Release the task from the queue, so other files
217 // which are enqueued can be opened. 217 // which are enqueued can be opened.
218 const auto it = opened_files_.find(file_handle); 218 const auto it = opened_files_.find(file_handle);
219 DCHECK(it != opened_files_.end()); 219 CHECK(it != opened_files_.end());
220 220
221 const int queue_token = it->second; 221 const int queue_token = it->second;
222 open_queue_->Remove(queue_token); 222 open_queue_->Remove(queue_token);
223 opened_files_.erase(file_handle); 223 opened_files_.erase(file_handle);
224 224
225 callback.Run(result); 225 callback.Run(result);
226 } 226 }
227 227
228 } // namespace file_system_provider 228 } // namespace file_system_provider
229 } // namespace chromeos 229 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/queue.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698