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

Side by Side Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 "chrome/browser/ui/webui/chromeos/drive_internals_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 using file_util::FileEnumerator; 44 using file_util::FileEnumerator;
45 // Use this map to sort the result list by the path. 45 // Use this map to sort the result list by the path.
46 std::map<FilePath, DictionaryValue*> files; 46 std::map<FilePath, DictionaryValue*> files;
47 47
48 const int options = (file_util::FileEnumerator::FILES | 48 const int options = (file_util::FileEnumerator::FILES |
49 file_util::FileEnumerator::DIRECTORIES | 49 file_util::FileEnumerator::DIRECTORIES |
50 file_util::FileEnumerator::SHOW_SYM_LINKS); 50 file_util::FileEnumerator::SHOW_SYM_LINKS);
51 FileEnumerator enumerator( 51 FileEnumerator enumerator(
52 root_path, 52 root_path,
53 true, // recursive 53 true, // recursive
54 static_cast<FileEnumerator::FileType>(options)); 54 options);
jar (doing other things) 2012/08/06 18:27:02 nit: no reason to wrap these... and if you do wrap
Haruki Sato 2012/08/06 23:22:18 Done. Thanks!
55 55
56 int64 total_size = 0; 56 int64 total_size = 0;
57 for (FilePath current = enumerator.Next(); !current.empty(); 57 for (FilePath current = enumerator.Next(); !current.empty();
58 current = enumerator.Next()) { 58 current = enumerator.Next()) {
59 FileEnumerator::FindInfo find_info; 59 FileEnumerator::FindInfo find_info;
60 enumerator.GetFindInfo(&find_info); 60 enumerator.GetFindInfo(&find_info);
61 int64 size = FileEnumerator::GetFilesize(find_info); 61 int64 size = FileEnumerator::GetFilesize(find_info);
62 const bool is_directory = FileEnumerator::IsDirectory(find_info); 62 const bool is_directory = FileEnumerator::IsDirectory(find_info);
63 const bool is_symbolic_link = FileEnumerator::IsLink(find_info); 63 const bool is_symbolic_link = FileEnumerator::IsLink(find_info);
64 const base::Time last_modified = 64 const base::Time last_modified =
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost); 348 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost);
349 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 349 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
350 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 350 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
351 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML); 351 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML);
352 352
353 Profile* profile = Profile::FromWebUI(web_ui); 353 Profile* profile = Profile::FromWebUI(web_ui);
354 ChromeURLDataManager::AddDataSource(profile, source); 354 ChromeURLDataManager::AddDataSource(profile, source);
355 } 355 }
356 356
357 } // namespace chromeos 357 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698