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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_manager_event_router.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the 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) 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/chromeos/extensions/file_manager/file_manager_event_rou ter.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/file_manager_event_rou ter.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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 NOTREACHED(); 93 NOTREACHED();
94 return ""; 94 return "";
95 } 95 }
96 96
97 void DirectoryExistsOnBlockingPool(const base::FilePath& directory_path, 97 void DirectoryExistsOnBlockingPool(const base::FilePath& directory_path,
98 const base::Closure& success_callback, 98 const base::Closure& success_callback,
99 const base::Closure& failure_callback) { 99 const base::Closure& failure_callback) {
100 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 100 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
101 101
102 if (file_util::DirectoryExists(directory_path)) 102 if (base::DirectoryExists(directory_path))
103 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, success_callback); 103 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, success_callback);
104 else 104 else
105 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, failure_callback); 105 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, failure_callback);
106 }; 106 };
107 107
108 void DirectoryExistsOnUIThread(const base::FilePath& directory_path, 108 void DirectoryExistsOnUIThread(const base::FilePath& directory_path,
109 const base::Closure& success_callback, 109 const base::Closure& success_callback,
110 const base::Closure& failure_callback) { 110 const base::Closure& failure_callback) {
111 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 111 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
112 112
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 DiskMountManager::GetInstance()->MountPath(device_path, std::string(), 834 DiskMountManager::GetInstance()->MountPath(device_path, std::string(),
835 std::string(), 835 std::string(),
836 chromeos::MOUNT_TYPE_DEVICE); 836 chromeos::MOUNT_TYPE_DEVICE);
837 } else { 837 } else {
838 notifications_->HideNotification(FileManagerNotifications::FORMAT_START, 838 notifications_->HideNotification(FileManagerNotifications::FORMAT_START,
839 device_path); 839 device_path);
840 notifications_->ShowNotification(FileManagerNotifications::FORMAT_FAIL, 840 notifications_->ShowNotification(FileManagerNotifications::FORMAT_FAIL,
841 device_path); 841 device_path);
842 } 842 }
843 } 843 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_encoding_browsertest.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698