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

Side by Side Diff: chrome/browser/chromeos/file_manager/filesystem_api_util.cc

Issue 513683002: [fsp] Add support for providing thumbnails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/file_manager/filesystem_api_util.h" 5 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (!parser.Parse()) { 163 if (!parser.Parse()) {
164 content::BrowserThread::PostTask( 164 content::BrowserThread::PostTask(
165 content::BrowserThread::UI, 165 content::BrowserThread::UI,
166 FROM_HERE, 166 FROM_HERE,
167 base::Bind(callback, false, std::string())); 167 base::Bind(callback, false, std::string()));
168 return; 168 return;
169 } 169 }
170 170
171 parser.file_system()->GetMetadata( 171 parser.file_system()->GetMetadata(
172 parser.file_path(), 172 parser.file_path(),
173 chromeos::file_system_provider::ProvidedFileSystemInterface::
174 METADATA_FIELD_DEFAULT,
173 base::Bind(&GetMimeTypeAfterGetMetadataForProvidedFileSystem, 175 base::Bind(&GetMimeTypeAfterGetMetadataForProvidedFileSystem,
174 callback)); 176 callback));
175 return; 177 return;
176 } 178 }
177 179
178 // As a fallback just return success with an empty mime type value. 180 // As a fallback just return success with an empty mime type value.
179 content::BrowserThread::PostTask( 181 content::BrowserThread::PostTask(
180 content::BrowserThread::UI, 182 content::BrowserThread::UI,
181 FROM_HERE, 183 FROM_HERE,
182 base::Bind(callback, true /* success */, std::string())); 184 base::Bind(callback, true /* success */, std::string()));
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 content::BrowserThread::IO, 238 content::BrowserThread::IO,
237 FROM_HERE, 239 FROM_HERE,
238 base::Bind(&PrepareFileOnIOThread, 240 base::Bind(&PrepareFileOnIOThread,
239 make_scoped_refptr(context), 241 make_scoped_refptr(context),
240 context->CrackURL(url), 242 context->CrackURL(url),
241 google_apis::CreateRelayCallback(callback))); 243 google_apis::CreateRelayCallback(callback)));
242 } 244 }
243 245
244 } // namespace util 246 } // namespace util
245 } // namespace file_manager 247 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698