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

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: Merged with parent 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 open_when_complete_(false), 231 open_when_complete_(false),
232 file_externally_removed_(false), 232 file_externally_removed_(false),
233 safety_state_(SAFE), 233 safety_state_(SAFE),
234 auto_opened_(false), 234 auto_opened_(false),
235 is_otr_(is_otr), 235 is_otr_(is_otr),
236 is_temporary_(!info.save_info.file_path.empty()), 236 is_temporary_(!info.save_info.file_path.empty()),
237 all_data_saved_(false), 237 all_data_saved_(false),
238 opened_(false), 238 opened_(false),
239 open_enabled_(true), 239 open_enabled_(true),
240 delegate_delayed_complete_(false), 240 delegate_delayed_complete_(false),
241 // TODO(ahendrickson): Pass in BoundNetLog in info. 241 bound_net_log_(info.bound_net_log) {
242 // For now, we can't create a valid one.
243 bound_net_log_(net::BoundNetLog()) {
244 delegate_->Attach(); 242 delegate_->Attach();
245 Init(true /* actively downloading */, 243 Init(true /* actively downloading */,
246 download_net_logs::SRC_NEW_DOWNLOAD); 244 download_net_logs::SRC_NEW_DOWNLOAD);
247 } 245 }
248 246
249 // Constructing for the "Save Page As..." feature: 247 // Constructing for the "Save Page As..." feature:
250 DownloadItemImpl::DownloadItemImpl(Delegate* delegate, 248 DownloadItemImpl::DownloadItemImpl(Delegate* delegate,
251 const FilePath& path, 249 const FilePath& path,
252 const GURL& url, 250 const GURL& url,
253 bool is_otr, 251 bool is_otr,
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 std::map<const void*, ExternalData*>::iterator it = 1119 std::map<const void*, ExternalData*>::iterator it =
1122 external_data_map_.find(key); 1120 external_data_map_.find(key);
1123 1121
1124 if (it == external_data_map_.end()) { 1122 if (it == external_data_map_.end()) {
1125 external_data_map_[key] = data; 1123 external_data_map_[key] = data;
1126 } else if (it->second != data) { 1124 } else if (it->second != data) {
1127 delete it->second; 1125 delete it->second;
1128 it->second = data; 1126 it->second = data;
1129 } 1127 }
1130 } 1128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698