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

Side by Side Diff: chrome/browser/drive/fake_drive_service.cc

Issue 140533002: drive: Apps.delete returns HTTP_NO_CONTENT on success. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 6 years, 11 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
« no previous file with comments | « chrome/browser/drive/drive_app_registry_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/drive/fake_drive_service.h" 5 #include "chrome/browser/drive/fake_drive_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 error = google_apis::GDATA_NO_CONNECTION; 1273 error = google_apis::GDATA_NO_CONNECTION;
1274 } else { 1274 } else {
1275 base::ListValue* items = NULL; 1275 base::ListValue* items = NULL;
1276 if (app_info_value_->GetList("items", &items)) { 1276 if (app_info_value_->GetList("items", &items)) {
1277 for (size_t i = 0; i < items->GetSize(); ++i) { 1277 for (size_t i = 0; i < items->GetSize(); ++i) {
1278 base::DictionaryValue* item = NULL; 1278 base::DictionaryValue* item = NULL;
1279 std::string id; 1279 std::string id;
1280 if (items->GetDictionary(i, &item) && item->GetString("id", &id) && 1280 if (items->GetDictionary(i, &item) && item->GetString("id", &id) &&
1281 id == app_id) { 1281 id == app_id) {
1282 if (items->Remove(i, NULL)) 1282 if (items->Remove(i, NULL))
1283 error = google_apis::HTTP_SUCCESS; 1283 error = google_apis::HTTP_NO_CONTENT;
1284 break; 1284 break;
1285 } 1285 }
1286 } 1286 }
1287 } 1287 }
1288 } 1288 }
1289 1289
1290 base::MessageLoop::current()->PostTask(FROM_HERE, 1290 base::MessageLoop::current()->PostTask(FROM_HERE,
1291 base::Bind(callback, error)); 1291 base::Bind(callback, error));
1292 return CancelCallback(); 1292 return CancelCallback();
1293 } 1293 }
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 FROM_HERE, 1732 FROM_HERE,
1733 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list))); 1733 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list)));
1734 } 1734 }
1735 1735
1736 GURL FakeDriveService::GetNewUploadSessionUrl() { 1736 GURL FakeDriveService::GetNewUploadSessionUrl() {
1737 return GURL("https://upload_session_url/" + 1737 return GURL("https://upload_session_url/" +
1738 base::Int64ToString(next_upload_sequence_number_++)); 1738 base::Int64ToString(next_upload_sequence_number_++));
1739 } 1739 }
1740 1740
1741 } // namespace drive 1741 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_app_registry_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698