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

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

Issue 716123002: [content/browser/download] Convert VLOGs to DVLOGs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « content/browser/download/save_file_manager.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 (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/save_package.h" 5 #include "content/browser/download/save_package.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 // Check current state. 1064 // Check current state.
1065 if (wait_state_ != HTML_DATA) 1065 if (wait_state_ != HTML_DATA)
1066 return; 1066 return;
1067 1067
1068 int id = contents_id(); 1068 int id = contents_id();
1069 // If the all frames are finished saving, we need to close the 1069 // If the all frames are finished saving, we need to close the
1070 // remaining SaveItems. 1070 // remaining SaveItems.
1071 if (flag == WebPageSerializerClient::AllFramesAreFinished) { 1071 if (flag == WebPageSerializerClient::AllFramesAreFinished) {
1072 for (SaveUrlItemMap::iterator it = in_progress_items_.begin(); 1072 for (SaveUrlItemMap::iterator it = in_progress_items_.begin();
1073 it != in_progress_items_.end(); ++it) { 1073 it != in_progress_items_.end(); ++it) {
1074 VLOG(20) << " " << __FUNCTION__ << "()" 1074 DVLOG(20) << " " << __FUNCTION__ << "()"
1075 << " save_id = " << it->second->save_id() 1075 << " save_id = " << it->second->save_id()
1076 << " url = \"" << it->second->url().spec() << "\""; 1076 << " url = \"" << it->second->url().spec() << "\"";
1077 BrowserThread::PostTask( 1077 BrowserThread::PostTask(
1078 BrowserThread::FILE, FROM_HERE, 1078 BrowserThread::FILE, FROM_HERE,
1079 base::Bind(&SaveFileManager::SaveFinished, 1079 base::Bind(&SaveFileManager::SaveFinished,
1080 file_manager_, 1080 file_manager_,
1081 it->second->save_id(), 1081 it->second->save_id(),
1082 it->second->url(), 1082 it->second->url(),
1083 id, 1083 id,
1084 true)); 1084 true));
1085 } 1085 }
1086 return; 1086 return;
(...skipping 29 matching lines...) Expand all
1116 BrowserThread::FILE, FROM_HERE, 1116 BrowserThread::FILE, FROM_HERE,
1117 base::Bind(&SaveFileManager::UpdateSaveProgress, 1117 base::Bind(&SaveFileManager::UpdateSaveProgress,
1118 file_manager_, 1118 file_manager_,
1119 save_item->save_id(), 1119 save_item->save_id(),
1120 new_data, 1120 new_data,
1121 static_cast<int>(data.size()))); 1121 static_cast<int>(data.size())));
1122 } 1122 }
1123 1123
1124 // Current frame is completed saving, call finish in file thread. 1124 // Current frame is completed saving, call finish in file thread.
1125 if (flag == WebPageSerializerClient::CurrentFrameIsFinished) { 1125 if (flag == WebPageSerializerClient::CurrentFrameIsFinished) {
1126 VLOG(20) << " " << __FUNCTION__ << "()" 1126 DVLOG(20) << " " << __FUNCTION__ << "()"
1127 << " save_id = " << save_item->save_id() 1127 << " save_id = " << save_item->save_id()
1128 << " url = \"" << save_item->url().spec() << "\""; 1128 << " url = \"" << save_item->url().spec() << "\"";
1129 BrowserThread::PostTask( 1129 BrowserThread::PostTask(
1130 BrowserThread::FILE, FROM_HERE, 1130 BrowserThread::FILE, FROM_HERE,
1131 base::Bind(&SaveFileManager::SaveFinished, 1131 base::Bind(&SaveFileManager::SaveFinished,
1132 file_manager_, 1132 file_manager_,
1133 save_item->save_id(), 1133 save_item->save_id(),
1134 save_item->url(), 1134 save_item->url(),
1135 id, 1135 id,
1136 true)); 1136 true));
1137 } 1137 }
1138 } 1138 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 1434
1435 void SavePackage::FinalizeDownloadEntry() { 1435 void SavePackage::FinalizeDownloadEntry() {
1436 DCHECK(download_); 1436 DCHECK(download_);
1437 DCHECK(download_manager_); 1437 DCHECK(download_manager_);
1438 1438
1439 download_manager_->OnSavePackageSuccessfullyFinished(download_); 1439 download_manager_->OnSavePackageSuccessfullyFinished(download_);
1440 StopObservation(); 1440 StopObservation();
1441 } 1441 }
1442 1442
1443 } // namespace content 1443 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698