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

Side by Side Diff: chrome/common/zip.cc

Issue 7618037: base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/zip_unittest.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/zip.h" 5 #include "chrome/common/zip.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_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 #endif 284 #endif
285 285
286 if (!zip_file) { 286 if (!zip_file) {
287 LOG(WARNING) << "couldn't create file " << dest_file_str; 287 LOG(WARNING) << "couldn't create file " << dest_file_str;
288 return false; 288 return false;
289 } 289 }
290 290
291 bool success = true; 291 bool success = true;
292 file_util::FileEnumerator file_enumerator( 292 file_util::FileEnumerator file_enumerator(
293 src_dir, true, // recursive 293 src_dir, true, // recursive
294 static_cast<file_util::FileEnumerator::FILE_TYPE>( 294 static_cast<file_util::FileEnumerator::FileType>(
295 file_util::FileEnumerator::FILES | 295 file_util::FileEnumerator::FILES |
296 file_util::FileEnumerator::DIRECTORIES)); 296 file_util::FileEnumerator::DIRECTORIES));
297 for (FilePath path = file_enumerator.Next(); !path.value().empty(); 297 for (FilePath path = file_enumerator.Next(); !path.value().empty();
298 path = file_enumerator.Next()) { 298 path = file_enumerator.Next()) {
299 if (!include_hidden_files && path.BaseName().value()[0] == '.') 299 if (!include_hidden_files && path.BaseName().value()[0] == '.')
300 continue; 300 continue;
301 301
302 if (!AddEntryToZip(zip_file, path, src_dir)) { 302 if (!AddEntryToZip(zip_file, path, src_dir)) {
303 success = false; 303 success = false;
304 return false; 304 return false;
305 } 305 }
306 } 306 }
307 307
308 if (ZIP_OK != zipClose(zip_file, NULL)) { // global comment 308 if (ZIP_OK != zipClose(zip_file, NULL)) { // global comment
309 LOG(ERROR) << "Error closing zip file " << dest_file_str; 309 LOG(ERROR) << "Error closing zip file " << dest_file_str;
310 return false; 310 return false;
311 } 311 }
312 312
313 return success; 313 return success;
314 } 314 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_file_util.cc ('k') | chrome/common/zip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698