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

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

Issue 216433002: drive: Make FileResource copyable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/drive/drive_api_util.cc ('k') | chrome/browser/drive/fake_drive_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_api_util_unittest.cc
diff --git a/chrome/browser/drive/drive_api_util_unittest.cc b/chrome/browser/drive/drive_api_util_unittest.cc
index afb4a131694e6cb977b85285fb241bc9d2a6ffad..af405f332c83b4b179c1dbab548f63788908b543 100644
--- a/chrome/browser/drive/drive_api_util_unittest.cc
+++ b/chrome/browser/drive/drive_api_util_unittest.cc
@@ -202,13 +202,11 @@ TEST(FileSystemUtilTest, ConvertFileResourceToResource_Parents) {
expected_links.push_back(GURL("http://server/id2"));
expected_links.push_back(GURL("http://server/id3"));
- ScopedVector<google_apis::ParentReference> parents;
for (size_t i = 0; i < expected_links.size(); ++i) {
- google_apis::ParentReference* parent = new google_apis::ParentReference;
- parent->set_parent_link(expected_links[i]);
- parents.push_back(parent);
+ google_apis::ParentReference parent;
+ parent.set_parent_link(expected_links[i]);
+ file_resource.mutable_parents()->push_back(parent);
}
- file_resource.set_parents(parents.Pass());
scoped_ptr<google_apis::ResourceEntry> entry(
ConvertFileResourceToResourceEntry(file_resource));
« no previous file with comments | « chrome/browser/drive/drive_api_util.cc ('k') | chrome/browser/drive/fake_drive_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698