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

Side by Side Diff: chrome/browser/google_apis/drive_api_service.cc

Issue 12090015: Implement CreateDirectoryOperation on Drive API v2. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add an empty line. Created 7 years, 10 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
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/google_apis/drive_api_service.h" 5 #include "chrome/browser/google_apis/drive_api_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 NOTREACHED(); 370 NOTREACHED();
371 } 371 }
372 372
373 void DriveAPIService::AddNewDirectory( 373 void DriveAPIService::AddNewDirectory(
374 const std::string& parent_resource_id, 374 const std::string& parent_resource_id,
375 const std::string& directory_name, 375 const std::string& directory_name,
376 const GetResourceEntryCallback& callback) { 376 const GetResourceEntryCallback& callback) {
377 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 377 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
378 DCHECK(!callback.is_null()); 378 DCHECK(!callback.is_null());
379 379
380 // TODO(kochi): Implement this. 380 runner_->StartOperationWithRetry(
381 NOTREACHED(); 381 new drive::CreateDirectoryOperation(
382 operation_registry(),
383 url_request_context_getter_,
384 url_generator_,
385 parent_resource_id,
386 directory_name,
387 base::Bind(&ParseResourceEntryAndRun, callback)));
382 } 388 }
383 389
384 void DriveAPIService::CopyHostedDocument( 390 void DriveAPIService::CopyHostedDocument(
385 const std::string& resource_id, 391 const std::string& resource_id,
386 const std::string& new_name, 392 const std::string& new_name,
387 const GetResourceEntryCallback& callback) { 393 const GetResourceEntryCallback& callback) {
388 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 394 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
389 DCHECK(!callback.is_null()); 395 DCHECK(!callback.is_null());
390 396
391 // TODO(kochi): Implement this. 397 // TODO(kochi): Implement this.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 495 }
490 496
491 void DriveAPIService::OnAuthenticationFailed(GDataErrorCode error) { 497 void DriveAPIService::OnAuthenticationFailed(GDataErrorCode error) {
492 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 498 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
493 FOR_EACH_OBSERVER( 499 FOR_EACH_OBSERVER(
494 DriveServiceObserver, observers_, 500 DriveServiceObserver, observers_,
495 OnAuthenticationFailed(error)); 501 OnAuthenticationFailed(error));
496 } 502 }
497 503
498 } // namespace google_apis 504 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_operations_unittest.cc ('k') | chrome/test/data/chromeos/drive/directory_entry.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698