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

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

Issue 10258004: Parent/child fixes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" 5 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h"
6 6
7 #include <string>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/platform_file.h" 11 #include "base/platform_file.h"
11 #include "base/string_util.h" 12 #include "base/string_util.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "chrome/browser/chromeos/gdata/gdata_system_service.h" 15 #include "chrome/browser/chromeos/gdata/gdata_system_service.h"
15 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" 16 #include "chrome/browser/chromeos/gdata/gdata_file_system.h"
16 #include "webkit/blob/shareable_file_reference.h" 17 #include "webkit/blob/shareable_file_reference.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (error != base::PLATFORM_FILE_OK) { 265 if (error != base::PLATFORM_FILE_OK) {
265 proxy->PostTask(FROM_HERE, 266 proxy->PostTask(FROM_HERE,
266 base::Bind(callback, 267 base::Bind(callback,
267 error, 268 error,
268 std::vector<base::FileUtilProxy::Entry>(), 269 std::vector<base::FileUtilProxy::Entry>(),
269 false)); 270 false));
270 return; 271 return;
271 } 272 }
272 std::vector<base::FileUtilProxy::Entry> entries; 273 std::vector<base::FileUtilProxy::Entry> entries;
273 // Convert gdata files to something File API stack can understand. 274 // Convert gdata files to something File API stack can understand.
275 for (GDataDirectoryCollection::const_iterator iter =
276 directory->child_directories().begin();
277 iter != directory->child_directories().end(); ++iter) {
278 entries.push_back(GDataEntryToFileUtilProxyEntry(*(iter->second)));
279 }
274 for (GDataFileCollection::const_iterator iter = 280 for (GDataFileCollection::const_iterator iter =
275 directory->children().begin(); 281 directory->child_files().begin();
276 iter != directory->children().end(); ++iter) { 282 iter != directory->child_files().end(); ++iter) {
277 if (hide_hosted_documents) { 283 if (hide_hosted_documents) {
278 GDataFile* file = iter->second->AsGDataFile(); 284 GDataFile* file = iter->second;
279 if (file && file->is_hosted_document()) 285 if (file->is_hosted_document())
280 continue; 286 continue;
281 } 287 }
282
283 entries.push_back(GDataEntryToFileUtilProxyEntry(*(iter->second))); 288 entries.push_back(GDataEntryToFileUtilProxyEntry(*(iter->second)));
284 } 289 }
285 290
286 proxy->PostTask(FROM_HERE, 291 proxy->PostTask(FROM_HERE,
287 base::Bind(callback, 292 base::Bind(callback,
288 base::PLATFORM_FILE_OK, 293 base::PLATFORM_FILE_OK,
289 entries, 294 entries,
290 false)); 295 false));
291 } 296 }
292 297
293 } // namespace gdata 298 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698