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

Side by Side Diff: chrome/browser/media_galleries/fileapi/itunes_finder_win.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/media_galleries/fileapi/itunes_finder_win.h" 5 #include "chrome/browser/media_galleries/fileapi/itunes_finder_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths_win.h" 9 #include "base/base_paths_win.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 63 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
64 64
65 base::FilePath music_dir; 65 base::FilePath music_dir;
66 if (!PathService::Get(chrome::DIR_USER_MUSIC, &music_dir)) { 66 if (!PathService::Get(chrome::DIR_USER_MUSIC, &music_dir)) {
67 PostResultToUIThread(std::string()); 67 PostResultToUIThread(std::string());
68 return; 68 return;
69 } 69 }
70 base::FilePath library_file = 70 base::FilePath library_file =
71 music_dir.AppendASCII("iTunes").AppendASCII("iTunes Music Library.xml"); 71 music_dir.AppendASCII("iTunes").AppendASCII("iTunes Music Library.xml");
72 72
73 if (!file_util::PathExists(library_file)) { 73 if (!base::PathExists(library_file)) {
74 PostResultToUIThread(std::string()); 74 PostResultToUIThread(std::string());
75 return; 75 return;
76 } 76 }
77 PostResultToUIThread(library_file.AsUTF8Unsafe()); 77 PostResultToUIThread(library_file.AsUTF8Unsafe());
78 } 78 }
79 79
80 void ITunesFinderWin::FinishedParsingPrefXML( 80 void ITunesFinderWin::FinishedParsingPrefXML(
81 const base::FilePath& library_file) { 81 const base::FilePath& library_file) {
82 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 82 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
83 83
84 if (library_file.empty() || !file_util::PathExists(library_file)) { 84 if (library_file.empty() || !base::PathExists(library_file)) {
85 TryDefaultLocation(); 85 TryDefaultLocation();
86 return; 86 return;
87 } 87 }
88 PostResultToUIThread(library_file.AsUTF8Unsafe()); 88 PostResultToUIThread(library_file.AsUTF8Unsafe());
89 } 89 }
90 90
91 } // namespace itunes 91 } // namespace itunes
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_log_uploader.cc ('k') | chrome/browser/media_galleries/fileapi/native_media_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698