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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 9809011: GData save package support with MHTML. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add comments and TODOs Created 8 years, 9 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/gdata/gdata_file_system.h" 5 #include "chrome/browser/chromeos/gdata/gdata_file_system.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 const FileOperationCallback& callback) { 565 const FileOperationCallback& callback) {
566 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 566 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
567 567
568 base::AutoLock lock(lock_); 568 base::AutoLock lock(lock_);
569 // Make sure the destination directory exists 569 // Make sure the destination directory exists
570 GDataFileBase* dest_dir = GetGDataFileInfoFromPath( 570 GDataFileBase* dest_dir = GetGDataFileInfoFromPath(
571 remote_dest_file_path.DirName()); 571 remote_dest_file_path.DirName());
572 if (!dest_dir || !dest_dir->AsGDataDirectory()) { 572 if (!dest_dir || !dest_dir->AsGDataDirectory()) {
573 base::MessageLoopProxy::current()->PostTask(FROM_HERE, 573 base::MessageLoopProxy::current()->PostTask(FROM_HERE,
574 base::Bind(callback, base::PLATFORM_FILE_ERROR_NOT_FOUND)); 574 base::Bind(callback, base::PLATFORM_FILE_ERROR_NOT_FOUND));
575 NOTREACHED();
575 return; 576 return;
576 } 577 }
577 578
578 std::string* resource_id = new std::string; 579 std::string* resource_id = new std::string;
579 BrowserThread::PostTaskAndReply( 580 BrowserThread::PostTaskAndReply(
580 BrowserThread::FILE, 581 BrowserThread::FILE,
581 FROM_HERE, 582 FROM_HERE,
582 base::Bind(&GDataFileSystem::GetDocumentResourceIdOnIOThreadPool, 583 base::Bind(&GDataFileSystem::GetDocumentResourceIdOnIOThreadPool,
583 local_file_path, 584 local_file_path,
584 resource_id), 585 resource_id),
(...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after
3568 const bool posted = BrowserThread::PostTask( 3569 const bool posted = BrowserThread::PostTask(
3569 BrowserThread::FILE, 3570 BrowserThread::FILE,
3570 from_here, 3571 from_here,
3571 base::Bind(&GDataFileSystem::RunTaskOnIOThreadPool, 3572 base::Bind(&GDataFileSystem::RunTaskOnIOThreadPool,
3572 base::Unretained(this), 3573 base::Unretained(this),
3573 task)); 3574 task));
3574 DCHECK(posted); 3575 DCHECK(posted);
3575 } 3576 }
3576 3577
3577 } // namespace gdata 3578 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698