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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc

Issue 10918101: Rename elements of LinkType enum (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 <utility> 5 #include <utility>
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/chromeos/gdata/drive_resource_metadata.h" 8 #include "chrome/browser/chromeos/gdata/drive_resource_metadata.h"
9 #include "chrome/browser/chromeos/gdata/drive_files.h" 9 #include "chrome/browser/chromeos/gdata/drive_files.h"
10 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h" 10 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 uma_stats->num_regular_files = 0; 251 uma_stats->num_regular_files = 0;
252 uma_stats->num_hosted_documents = 0; 252 uma_stats->num_hosted_documents = 0;
253 uma_stats->num_files_with_entry_kind.clear(); 253 uma_stats->num_files_with_entry_kind.clear();
254 for (size_t i = 0; i < feed_list.size(); ++i) { 254 for (size_t i = 0; i < feed_list.size(); ++i) {
255 const DocumentFeed* feed = feed_list[i]; 255 const DocumentFeed* feed = feed_list[i];
256 256
257 // Get upload url from the root feed. Links for all other collections will 257 // Get upload url from the root feed. Links for all other collections will
258 // be handled in GDatadirectory::FromDocumentEntry(); 258 // be handled in GDatadirectory::FromDocumentEntry();
259 if (i == 0) { 259 if (i == 0) {
260 const Link* root_feed_upload_link = 260 const Link* root_feed_upload_link =
261 feed->GetLinkByType(Link::RESUMABLE_CREATE_MEDIA); 261 feed->GetLinkByType(Link::kResumableCreateMedia);
262 if (root_feed_upload_link) 262 if (root_feed_upload_link)
263 resource_metadata_->root()->set_upload_url( 263 resource_metadata_->root()->set_upload_url(
264 root_feed_upload_link->href()); 264 root_feed_upload_link->href());
265 *feed_changestamp = feed->largest_changestamp(); 265 *feed_changestamp = feed->largest_changestamp();
266 DCHECK_GE(*feed_changestamp, 0); 266 DCHECK_GE(*feed_changestamp, 0);
267 } 267 }
268 268
269 for (ScopedVector<DocumentEntry>::const_iterator iter = 269 for (ScopedVector<DocumentEntry>::const_iterator iter =
270 feed->entries().begin(); 270 feed->entries().begin();
271 iter != feed->entries().end(); ++iter) { 271 iter != feed->entries().end(); ++iter) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // If the code above fails to parse a feed, any DriveEntry instance 309 // If the code above fails to parse a feed, any DriveEntry instance
310 // added to |file_by_url| is not managed by a DriveDirectory instance, 310 // added to |file_by_url| is not managed by a DriveDirectory instance,
311 // so we need to explicitly release them here. 311 // so we need to explicitly release them here.
312 STLDeleteValues(file_map); 312 STLDeleteValues(file_map);
313 } 313 }
314 314
315 return error; 315 return error;
316 } 316 }
317 317
318 } // namespace gdata 318 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698