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

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

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « content/browser/download/save_item.h ('k') | content/browser/download/save_package.h » ('j') | 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_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"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return percent; 107 return percent;
108 } 108 }
109 default: { 109 default: {
110 NOTREACHED(); 110 NOTREACHED();
111 return -1; 111 return -1;
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 // Rename the save item with new path. 116 // Rename the save item with new path.
117 void SaveItem::Rename(const FilePath& full_path) { 117 void SaveItem::Rename(const base::FilePath& full_path) {
118 DCHECK(!full_path.empty() && !has_final_name()); 118 DCHECK(!full_path.empty() && !has_final_name());
119 full_path_ = full_path; 119 full_path_ = full_path;
120 file_name_ = full_path_.BaseName(); 120 file_name_ = full_path_.BaseName();
121 has_final_name_ = true; 121 has_final_name_ = true;
122 } 122 }
123 123
124 void SaveItem::SetSaveId(int32 save_id) { 124 void SaveItem::SetSaveId(int32 save_id) {
125 DCHECK(save_id_ == -1); 125 DCHECK(save_id_ == -1);
126 save_id_ = save_id; 126 save_id_ = save_id;
127 } 127 }
128 128
129 void SaveItem::SetTotalBytes(int64 total_bytes) { 129 void SaveItem::SetTotalBytes(int64 total_bytes) {
130 DCHECK(total_bytes_ == 0); 130 DCHECK(total_bytes_ == 0);
131 total_bytes_ = total_bytes; 131 total_bytes_ = total_bytes;
132 } 132 }
133 133
134 } // namespace content 134 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/save_item.h ('k') | content/browser/download/save_package.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698