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

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: fix missing comma. 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 30 matching lines...) Expand all
41 void GetGCacheContents(const FilePath& root_path, 41 void GetGCacheContents(const FilePath& root_path,
42 base::ListValue* gcache_contents, 42 base::ListValue* gcache_contents,
43 base::DictionaryValue* gcache_summary) { 43 base::DictionaryValue* gcache_summary) {
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(root_path, true /* recursive */, options);
52 root_path,
53 true, // recursive
54 static_cast<FileEnumerator::FileType>(options));
55 52
56 int64 total_size = 0; 53 int64 total_size = 0;
57 for (FilePath current = enumerator.Next(); !current.empty(); 54 for (FilePath current = enumerator.Next(); !current.empty();
58 current = enumerator.Next()) { 55 current = enumerator.Next()) {
59 FileEnumerator::FindInfo find_info; 56 FileEnumerator::FindInfo find_info;
60 enumerator.GetFindInfo(&find_info); 57 enumerator.GetFindInfo(&find_info);
61 int64 size = FileEnumerator::GetFilesize(find_info); 58 int64 size = FileEnumerator::GetFilesize(find_info);
62 const bool is_directory = FileEnumerator::IsDirectory(find_info); 59 const bool is_directory = FileEnumerator::IsDirectory(find_info);
63 const bool is_symbolic_link = FileEnumerator::IsLink(find_info); 60 const bool is_symbolic_link = FileEnumerator::IsLink(find_info);
64 const base::Time last_modified = 61 const base::Time last_modified =
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost); 345 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost);
349 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 346 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
350 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 347 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
351 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML); 348 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML);
352 349
353 Profile* profile = Profile::FromWebUI(web_ui); 350 Profile* profile = Profile::FromWebUI(web_ui);
354 ChromeURLDataManager::AddDataSource(profile, source); 351 ChromeURLDataManager::AddDataSource(profile, source);
355 } 352 }
356 353
357 } // namespace chromeos 354 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/policy/app_pack_updater.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698