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

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

Issue 9296012: Hooked up NetLog to DownloadItem, DownloadFile, and FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Randy's comments. 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
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/download_item_impl.h" 5 #include "content/browser/download/download_item_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 open_when_complete_(false), 230 open_when_complete_(false),
231 file_externally_removed_(false), 231 file_externally_removed_(false),
232 safety_state_(SAFE), 232 safety_state_(SAFE),
233 auto_opened_(false), 233 auto_opened_(false),
234 is_otr_(is_otr), 234 is_otr_(is_otr),
235 is_temporary_(!info.save_info.file_path.empty()), 235 is_temporary_(!info.save_info.file_path.empty()),
236 all_data_saved_(false), 236 all_data_saved_(false),
237 opened_(false), 237 opened_(false),
238 open_enabled_(true), 238 open_enabled_(true),
239 delegate_delayed_complete_(false), 239 delegate_delayed_complete_(false),
240 bound_net_log_(net::BoundNetLog()) { 240 bound_net_log_(info.bound_net_log) {
241 delegate_->Attach(); 241 delegate_->Attach();
242 Init(true /* actively downloading */, 242 Init(true /* actively downloading */,
243 download_net_logs::SRC_NEW_DOWNLOAD); 243 download_net_logs::SRC_NEW_DOWNLOAD);
244 } 244 }
245 245
246 // Constructing for the "Save Page As..." feature: 246 // Constructing for the "Save Page As..." feature:
247 DownloadItemImpl::DownloadItemImpl(Delegate* delegate, 247 DownloadItemImpl::DownloadItemImpl(Delegate* delegate,
248 const FilePath& path, 248 const FilePath& path,
249 const GURL& url, 249 const GURL& url,
250 bool is_otr, 250 bool is_otr,
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 std::map<const void*, ExternalData*>::iterator it = 1103 std::map<const void*, ExternalData*>::iterator it =
1104 external_data_map_.find(key); 1104 external_data_map_.find(key);
1105 1105
1106 if (it == external_data_map_.end()) { 1106 if (it == external_data_map_.end()) {
1107 external_data_map_[key] = data; 1107 external_data_map_[key] = data;
1108 } else if (it->second != data) { 1108 } else if (it->second != data) {
1109 delete it->second; 1109 delete it->second;
1110 it->second = data; 1110 it->second = data;
1111 } 1111 }
1112 } 1112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698