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

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

Issue 10387090: Pass the referrer policy with the referrer for the save package code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_item.h" 5 #include "content/browser/download/save_item.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "content/browser/download/save_file.h" 10 #include "content/browser/download/save_file.h"
11 #include "content/browser/download/save_file_manager.h" 11 #include "content/browser/download/save_file_manager.h"
12 #include "content/browser/download/save_package.h" 12 #include "content/browser/download/save_package.h"
13 13
14 // Constructor for SaveItem when creating each saving job. 14 // Constructor for SaveItem when creating each saving job.
15 SaveItem::SaveItem(const GURL& url, 15 SaveItem::SaveItem(const GURL& url,
16 const GURL& referrer, 16 const content::Referrer& referrer,
17 SavePackage* package, 17 SavePackage* package,
18 SaveFileCreateInfo::SaveFileSource save_source) 18 SaveFileCreateInfo::SaveFileSource save_source)
19 : save_id_(-1), 19 : save_id_(-1),
20 url_(url), 20 url_(url),
21 referrer_(referrer), 21 referrer_(referrer),
22 total_bytes_(0), 22 total_bytes_(0),
23 received_bytes_(0), 23 received_bytes_(0),
24 state_(WAIT_START), 24 state_(WAIT_START),
25 has_final_name_(false), 25 has_final_name_(false),
26 is_success_(false), 26 is_success_(false),
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 void SaveItem::SetSaveId(int32 save_id) { 122 void SaveItem::SetSaveId(int32 save_id) {
123 DCHECK(save_id_ == -1); 123 DCHECK(save_id_ == -1);
124 save_id_ = save_id; 124 save_id_ = save_id;
125 } 125 }
126 126
127 void SaveItem::SetTotalBytes(int64 total_bytes) { 127 void SaveItem::SetTotalBytes(int64 total_bytes) {
128 DCHECK(total_bytes_ == 0); 128 DCHECK(total_bytes_ == 0);
129 total_bytes_ = total_bytes; 129 total_bytes_ = total_bytes;
130 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698