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

Side by Side Diff: chrome/browser/chromeos/drive/drive_system_service.cc

Issue 15060002: drive: Rename FileCache methods in a blocking pool centric manner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/drive/drive_system_service.h" 5 #include "chrome/browser/chromeos/drive/drive_system_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 return true; 212 return true;
213 } 213 }
214 214
215 void DriveSystemService::ClearCacheAndRemountFileSystem( 215 void DriveSystemService::ClearCacheAndRemountFileSystem(
216 const base::Callback<void(bool)>& callback) { 216 const base::Callback<void(bool)>& callback) {
217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
218 DCHECK(!callback.is_null()); 218 DCHECK(!callback.is_null());
219 219
220 RemoveDriveMountPoint(); 220 RemoveDriveMountPoint();
221 cache_->ClearAll(base::Bind( 221 cache_->ClearAllOnUIThread(base::Bind(
222 &DriveSystemService::ReinitializeResourceMetadataAfterClearCache, 222 &DriveSystemService::ReinitializeResourceMetadataAfterClearCache,
223 weak_ptr_factory_.GetWeakPtr(), 223 weak_ptr_factory_.GetWeakPtr(),
224 callback)); 224 callback));
225 } 225 }
226 226
227 void DriveSystemService::ReinitializeResourceMetadataAfterClearCache( 227 void DriveSystemService::ReinitializeResourceMetadataAfterClearCache(
228 const base::Callback<void(bool)>& callback, 228 const base::Callback<void(bool)>& callback,
229 bool success) { 229 bool success) {
230 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 230 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
231 DCHECK(!callback.is_null()); 231 DCHECK(!callback.is_null());
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 if (factory_for_test_.is_null()) 439 if (factory_for_test_.is_null())
440 service = new DriveSystemService(profile, NULL, base::FilePath(), NULL); 440 service = new DriveSystemService(profile, NULL, base::FilePath(), NULL);
441 else 441 else
442 service = factory_for_test_.Run(profile); 442 service = factory_for_test_.Run(profile);
443 443
444 service->Initialize(); 444 service->Initialize();
445 return service; 445 return service;
446 } 446 }
447 447
448 } // namespace drive 448 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698