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

Side by Side Diff: content/browser/download/base_file_win.cc

Issue 1008613002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[a-d]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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/download/base_file.h" 5 #include "content/browser/download/base_file.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <cguid.h> 8 #include <cguid.h>
9 #include <objbase.h> 9 #include <objbase.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 interrupt_reason = DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; 346 interrupt_reason = DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
347 else if (result != 0) 347 else if (result != 0)
348 interrupt_reason = MapShFileOperationCodes(result); 348 interrupt_reason = MapShFileOperationCodes(result);
349 349
350 if (interrupt_reason != DOWNLOAD_INTERRUPT_REASON_NONE) 350 if (interrupt_reason != DOWNLOAD_INTERRUPT_REASON_NONE)
351 return LogInterruptReason("SHFileOperation", result, interrupt_reason); 351 return LogInterruptReason("SHFileOperation", result, interrupt_reason);
352 return interrupt_reason; 352 return interrupt_reason;
353 } 353 }
354 354
355 DownloadInterruptReason BaseFile::AnnotateWithSourceInformation() { 355 DownloadInterruptReason BaseFile::AnnotateWithSourceInformation() {
356 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 356 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
357 DCHECK(!detached_); 357 DCHECK(!detached_);
358 358
359 bound_net_log_.BeginEvent(net::NetLog::TYPE_DOWNLOAD_FILE_ANNOTATED); 359 bound_net_log_.BeginEvent(net::NetLog::TYPE_DOWNLOAD_FILE_ANNOTATED);
360 DownloadInterruptReason result = DOWNLOAD_INTERRUPT_REASON_NONE; 360 DownloadInterruptReason result = DOWNLOAD_INTERRUPT_REASON_NONE;
361 std::string braces_guid = "{" + client_guid_ + "}"; 361 std::string braces_guid = "{" + client_guid_ + "}";
362 GUID guid = GUID_NULL; 362 GUID guid = GUID_NULL;
363 if (base::IsValidGUID(client_guid_)) { 363 if (base::IsValidGUID(client_guid_)) {
364 HRESULT hr = CLSIDFromString( 364 HRESULT hr = CLSIDFromString(
365 base::UTF8ToUTF16(braces_guid).c_str(), &guid); 365 base::UTF8ToUTF16(braces_guid).c_str(), &guid);
366 if (FAILED(hr)) 366 if (FAILED(hr))
(...skipping 20 matching lines...) Expand all
387 RecordDownloadCount(FILE_MISSING_AFTER_SUCCESSFUL_SCAN_COUNT); 387 RecordDownloadCount(FILE_MISSING_AFTER_SUCCESSFUL_SCAN_COUNT);
388 result = DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED; 388 result = DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED;
389 } 389 }
390 LogInterruptReason("ScanAndSaveDownloadedFile", hr, result); 390 LogInterruptReason("ScanAndSaveDownloadedFile", hr, result);
391 } 391 }
392 bound_net_log_.EndEvent(net::NetLog::TYPE_DOWNLOAD_FILE_ANNOTATED); 392 bound_net_log_.EndEvent(net::NetLog::TYPE_DOWNLOAD_FILE_ANNOTATED);
393 return result; 393 return result;
394 } 394 }
395 395
396 } // namespace content 396 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/base_file_mac.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698