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

Unified Diff: chrome/browser/drive/fake_drive_service.cc

Issue 394103003: Add unit tests for drive::FileTaskExecutor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to Review #2 Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/drive/fake_drive_service.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/fake_drive_service.cc
diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc
index c69b2166b03cba0d4fc8678dc558c3d741ceae42..ae9cfecc48bf21aac25c0a2f91339aa645c5de34 100644
--- a/chrome/browser/drive/fake_drive_service.cc
+++ b/chrome/browser/drive/fake_drive_service.cc
@@ -1168,6 +1168,16 @@ CancelCallback FakeDriveService::AuthorizeApp(
const AuthorizeAppCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
+
+ if (entries_.count(resource_id) == 0) {
+ callback.Run(google_apis::HTTP_NOT_FOUND, GURL());
+ return CancelCallback();
+ }
+
+ callback.Run(HTTP_SUCCESS,
+ GURL(base::StringPrintf(open_url_format_.c_str(),
+ resource_id.c_str(),
+ app_id.c_str())));
return CancelCallback();
}
« no previous file with comments | « chrome/browser/drive/fake_drive_service.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698