diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/drive/drive_app_registry.cc | 2 | ||||
-rw-r--r-- | chrome/browser/drive/drive_app_registry.h | 3 | ||||
-rw-r--r-- | chrome/browser/drive/drive_app_registry_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/drive/fake_drive_service.cc | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/drive/drive_app_registry.cc b/chrome/browser/drive/drive_app_registry.cc index aed8ab1..903cbd8 100644 --- a/chrome/browser/drive/drive_app_registry.cc +++ b/chrome/browser/drive/drive_app_registry.cc @@ -195,7 +195,7 @@ void DriveAppRegistry::UninstallApp(const std::string& app_id, void DriveAppRegistry::OnAppUninstalled(const std::string& app_id, const UninstallCallback& callback, google_apis::GDataErrorCode error) { - if (error == google_apis::HTTP_SUCCESS) { + if (error == google_apis::HTTP_NO_CONTENT) { all_apps_.erase(app_id); RemoveAppFromSelector(app_id, &mimetype_map_); RemoveAppFromSelector(app_id, &extension_map_); diff --git a/chrome/browser/drive/drive_app_registry.h b/chrome/browser/drive/drive_app_registry.h index dd53bae..26bf3c1 100644 --- a/chrome/browser/drive/drive_app_registry.h +++ b/chrome/browser/drive/drive_app_registry.h @@ -71,7 +71,8 @@ class DriveAppRegistry { void GetAppList(std::vector<DriveAppInfo>* apps) const; // Uninstalls the app specified by |app_id|. This method sends requests to the - // remote server, and returns the result to |callback| asynchronously. + // remote server, and returns the result to |callback| asynchronously. When + // succeeded, the callback receives HTTP_NO_CONTENT, and error code otherwise. // |callback| must not be null. void UninstallApp(const std::string& app_id, const UninstallCallback& callback); diff --git a/chrome/browser/drive/drive_app_registry_unittest.cc b/chrome/browser/drive/drive_app_registry_unittest.cc index 77d828f..6e04fd0 100644 --- a/chrome/browser/drive/drive_app_registry_unittest.cc +++ b/chrome/browser/drive/drive_app_registry_unittest.cc @@ -151,7 +151,7 @@ TEST_F(DriveAppRegistryTest, UninstallDriveApp) { "123456788192", google_apis::test_util::CreateCopyResultCallback(&error)); base::RunLoop().RunUntilIdle(); - EXPECT_EQ(error, google_apis::HTTP_SUCCESS); + EXPECT_EQ(error, google_apis::HTTP_NO_CONTENT); // Check that the number of apps is decreased by one. apps_registry_->GetAppList(&apps); diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc index 6ea4bf8..6995f28 100644 --- a/chrome/browser/drive/fake_drive_service.cc +++ b/chrome/browser/drive/fake_drive_service.cc @@ -1280,7 +1280,7 @@ CancelCallback FakeDriveService::UninstallApp( if (items->GetDictionary(i, &item) && item->GetString("id", &id) && id == app_id) { if (items->Remove(i, NULL)) - error = google_apis::HTTP_SUCCESS; + error = google_apis::HTTP_NO_CONTENT; break; } } |