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

Side by Side Diff: base/nix/mime_util_xdg.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 | « base/files/important_file_writer.cc ('k') | base/sys_info_chromeos.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) 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 "base/nix/mime_util_xdg.h" 5 #include "base/nix/mime_util_xdg.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return false; 380 return false;
381 } 381 }
382 subdirs_[dir] = num++; 382 subdirs_[dir] = num++;
383 info_array_.reset(new SubDirInfo[num]); 383 info_array_.reset(new SubDirInfo[num]);
384 return true; 384 return true;
385 } 385 }
386 386
387 bool CheckDirExistsAndGetMtime(const FilePath& dir, Time* last_modified) { 387 bool CheckDirExistsAndGetMtime(const FilePath& dir, Time* last_modified) {
388 if (!DirectoryExists(dir)) 388 if (!DirectoryExists(dir))
389 return false; 389 return false;
390 PlatformFileInfo file_info; 390 File::Info file_info;
391 if (!GetFileInfo(dir, &file_info)) 391 if (!GetFileInfo(dir, &file_info))
392 return false; 392 return false;
393 *last_modified = file_info.last_modified; 393 *last_modified = file_info.last_modified;
394 return true; 394 return true;
395 } 395 }
396 396
397 // Make sure |dir| exists and add it to the list of icon directories. 397 // Make sure |dir| exists and add it to the list of icon directories.
398 void TryAddIconDir(const FilePath& dir) { 398 void TryAddIconDir(const FilePath& dir) {
399 Time last_modified; 399 Time last_modified;
400 if (!CheckDirExistsAndGetMtime(dir, &last_modified)) 400 if (!CheckDirExistsAndGetMtime(dir, &last_modified))
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 icon_file = LookupIconInDefaultTheme(icon_names[i], size); 644 icon_file = LookupIconInDefaultTheme(icon_names[i], size);
645 if (!icon_file.empty()) 645 if (!icon_file.empty())
646 return icon_file; 646 return icon_file;
647 } 647 }
648 } 648 }
649 return FilePath(); 649 return FilePath();
650 } 650 }
651 651
652 } // namespace nix 652 } // namespace nix
653 } // namespace base 653 } // namespace base
OLDNEW
« no previous file with comments | « base/files/important_file_writer.cc ('k') | base/sys_info_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698