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

Side by Side Diff: chrome/browser/media_galleries/fileapi/picasa_file_util.cc

Issue 23442026: Media Galleries API Picasa: Fix PicasaFileUtil GetInfoSync minor bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media_galleries/fileapi/picasa_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/picasa_file_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 base::Passed(&context), 96 base::Passed(&context),
97 url, 97 url,
98 callback)); 98 callback));
99 } 99 }
100 100
101 base::PlatformFileError PicasaFileUtil::GetFileInfoSync( 101 base::PlatformFileError PicasaFileUtil::GetFileInfoSync(
102 FileSystemOperationContext* context, const FileSystemURL& url, 102 FileSystemOperationContext* context, const FileSystemURL& url,
103 base::PlatformFileInfo* file_info, base::FilePath* platform_path) { 103 base::PlatformFileInfo* file_info, base::FilePath* platform_path) {
104 DCHECK(context); 104 DCHECK(context);
105 DCHECK(file_info); 105 DCHECK(file_info);
106 DCHECK(platform_path);
107 106
108 *platform_path = base::FilePath(); 107 if (platform_path)
108 *platform_path = base::FilePath();
109 109
110 std::vector<std::string> components; 110 std::vector<std::string> components;
111 fileapi::VirtualPath::GetComponentsUTF8Unsafe(url.path(), &components); 111 fileapi::VirtualPath::GetComponentsUTF8Unsafe(url.path(), &components);
112 112
113 switch (components.size()) { 113 switch (components.size()) {
114 case 0: 114 case 0:
115 // Root directory. 115 // Root directory.
116 file_info->is_directory = true; 116 file_info->is_directory = true;
117 return base::PLATFORM_FILE_OK; 117 return base::PLATFORM_FILE_OK;
118 case 1: 118 case 1:
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 NativeMediaFileUtil::ReadDirectoryOnTaskRunnerThread( 365 NativeMediaFileUtil::ReadDirectoryOnTaskRunnerThread(
366 context.Pass(), url, callback); 366 context.Pass(), url, callback);
367 } 367 }
368 368
369 PicasaDataProvider* PicasaFileUtil::GetDataProvider() { 369 PicasaDataProvider* PicasaFileUtil::GetDataProvider() {
370 return ImportedMediaGalleryRegistry::PicasaDataProvider(); 370 return ImportedMediaGalleryRegistry::PicasaDataProvider();
371 } 371 }
372 372
373 } // namespace picasa 373 } // namespace picasa
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698