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

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

Issue 10854083: Remove parent* arg from GDataEntry ctor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 4 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/chromeos/gdata/gdata_files_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 "base/metrics/histogram.h" 5 #include "base/metrics/histogram.h"
6 #include "chrome/browser/chromeos/gdata/gdata_files.h" 6 #include "chrome/browser/chromeos/gdata/gdata_files.h"
7 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h" 7 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 using content::BrowserThread; 10 using content::BrowserThread;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 directory_service_->root()->set_upload_url( 278 directory_service_->root()->set_upload_url(
279 root_feed_upload_link->href()); 279 root_feed_upload_link->href());
280 *feed_changestamp = feed->largest_changestamp(); 280 *feed_changestamp = feed->largest_changestamp();
281 DCHECK_GE(*feed_changestamp, 0); 281 DCHECK_GE(*feed_changestamp, 0);
282 } 282 }
283 283
284 for (ScopedVector<DocumentEntry>::const_iterator iter = 284 for (ScopedVector<DocumentEntry>::const_iterator iter =
285 feed->entries().begin(); 285 feed->entries().begin();
286 iter != feed->entries().end(); ++iter) { 286 iter != feed->entries().end(); ++iter) {
287 DocumentEntry* doc = *iter; 287 DocumentEntry* doc = *iter;
288 GDataEntry* entry = GDataEntry::FromDocumentEntry( 288 GDataEntry* entry = directory_service_->FromDocumentEntry(doc);
289 NULL, doc, directory_service_);
290 // Some document entries don't map into files (i.e. sites). 289 // Some document entries don't map into files (i.e. sites).
291 if (!entry) 290 if (!entry)
292 continue; 291 continue;
293 // Count the number of files. 292 // Count the number of files.
294 GDataFile* as_file = entry->AsGDataFile(); 293 GDataFile* as_file = entry->AsGDataFile();
295 if (as_file) { 294 if (as_file) {
296 if (as_file->is_hosted_document()) 295 if (as_file->is_hosted_document())
297 ++uma_stats->num_hosted_documents; 296 ++uma_stats->num_hosted_documents;
298 else 297 else
299 ++uma_stats->num_regular_files; 298 ++uma_stats->num_regular_files;
(...skipping 22 matching lines...) Expand all
322 // If the code above fails to parse a feed, any GDataEntry instance 321 // If the code above fails to parse a feed, any GDataEntry instance
323 // added to |file_by_url| is not managed by a GDataDirectory instance, 322 // added to |file_by_url| is not managed by a GDataDirectory instance,
324 // so we need to explicitly release them here. 323 // so we need to explicitly release them here.
325 STLDeleteValues(file_map); 324 STLDeleteValues(file_map);
326 } 325 }
327 326
328 return error; 327 return error;
329 } 328 }
330 329
331 } // namespace gdata 330 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698