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

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

Issue 23625013: Remove drive::FileSystemInterface::Initialize(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 3 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/file_system.h" 5 #include "chrome/browser/chromeos/drive/file_system.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/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 ResetComponents(); 267 ResetComponents();
268 } 268 }
269 269
270 FileSystem::~FileSystem() { 270 FileSystem::~FileSystem() {
271 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 271 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
272 272
273 change_list_loader_->RemoveObserver(this); 273 change_list_loader_->RemoveObserver(this);
274 } 274 }
275 275
276 void FileSystem::Initialize() {
277 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
278 }
279
280 void FileSystem::Reload(const FileOperationCallback& callback) { 276 void FileSystem::Reload(const FileOperationCallback& callback) {
281 // Discard the current loader and operation objects and renew them. This is to 277 // Discard the current loader and operation objects and renew them. This is to
282 // avoid that changes initiated before the metadata reset is applied after the 278 // avoid that changes initiated before the metadata reset is applied after the
283 // reset, which may cause an inconsistent state. 279 // reset, which may cause an inconsistent state.
284 // TODO(kinaba): callbacks held in the subcomponents are discarded. We might 280 // TODO(kinaba): callbacks held in the subcomponents are discarded. We might
285 // want to have a way to abort and flush callbacks in in-flight operations. 281 // want to have a way to abort and flush callbacks in in-flight operations.
286 ResetComponents(); 282 ResetComponents();
287 283
288 base::PostTaskAndReplyWithResult( 284 base::PostTaskAndReplyWithResult(
289 blocking_task_runner_, 285 blocking_task_runner_,
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 if (util::IsSpecialResourceId(id)) 1057 if (util::IsSpecialResourceId(id))
1062 return; 1058 return;
1063 1059
1064 util::Log(logging::LOG_INFO, 1060 util::Log(logging::LOG_INFO,
1065 "Thumbnail refresh for %s", directory_path.AsUTF8Unsafe().c_str()); 1061 "Thumbnail refresh for %s", directory_path.AsUTF8Unsafe().c_str());
1066 change_list_loader_->LoadDirectoryFromServer( 1062 change_list_loader_->LoadDirectoryFromServer(
1067 id, base::Bind(&util::EmptyFileOperationCallback)); 1063 id, base::Bind(&util::EmptyFileOperationCallback));
1068 } 1064 }
1069 1065
1070 } // namespace drive 1066 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.h ('k') | chrome/browser/chromeos/drive/file_system_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698