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

Side by Side Diff: chrome/browser/extensions/api/file_handlers/mime_util.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
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/extensions/api/file_handlers/mime_util.h" 5 #include "chrome/browser/extensions/api/file_handlers/mime_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "net/base/filename_util.h" 11 #include "net/base/filename_util.h"
12 #include "net/base/mime_sniffer.h" 12 #include "net/base/mime_sniffer.h"
13 #include "net/base/mime_util.h" 13 #include "net/base/mime_util.h"
14 #include "webkit/browser/fileapi/file_system_url.h" 14 #include "storage/browser/fileapi/file_system_url.h"
15 15
16 #if defined(OS_CHROMEOS) 16 #if defined(OS_CHROMEOS)
17 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" 17 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h"
18 #endif 18 #endif
19 19
20 using content::BrowserThread; 20 using content::BrowserThread;
21 21
22 namespace extensions { 22 namespace extensions {
23 namespace app_file_handler_util { 23 namespace app_file_handler_util {
24 namespace { 24 namespace {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 MimeTypeCollector::MimeTypeCollector(Profile* profile) 148 MimeTypeCollector::MimeTypeCollector(Profile* profile)
149 : profile_(profile), left_(0), weak_ptr_factory_(this) { 149 : profile_(profile), left_(0), weak_ptr_factory_(this) {
150 } 150 }
151 151
152 MimeTypeCollector::~MimeTypeCollector() { 152 MimeTypeCollector::~MimeTypeCollector() {
153 } 153 }
154 154
155 void MimeTypeCollector::CollectForURLs( 155 void MimeTypeCollector::CollectForURLs(
156 const std::vector<fileapi::FileSystemURL>& urls, 156 const std::vector<storage::FileSystemURL>& urls,
157 const CompletionCallback& callback) { 157 const CompletionCallback& callback) {
158 std::vector<base::FilePath> local_paths; 158 std::vector<base::FilePath> local_paths;
159 for (size_t i = 0; i < urls.size(); ++i) { 159 for (size_t i = 0; i < urls.size(); ++i) {
160 local_paths.push_back(urls[i].path()); 160 local_paths.push_back(urls[i].path());
161 } 161 }
162 162
163 CollectForLocalPaths(local_paths, callback); 163 CollectForLocalPaths(local_paths, callback);
164 } 164 }
165 165
166 void MimeTypeCollector::CollectForLocalPaths( 166 void MimeTypeCollector::CollectForLocalPaths(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 FROM_HERE, base::Bind(callback_, base::Passed(&result_))); 198 FROM_HERE, base::Bind(callback_, base::Passed(&result_)));
199 // Release the callback to avoid a circullar reference in case an instance 199 // Release the callback to avoid a circullar reference in case an instance
200 // of this class is a member of a ref counted class, which instance is bound 200 // of this class is a member of a ref counted class, which instance is bound
201 // to this callback. 201 // to this callback.
202 callback_ = CompletionCallback(); 202 callback_ = CompletionCallback();
203 } 203 }
204 } 204 }
205 205
206 } // namespace app_file_handler_util 206 } // namespace app_file_handler_util
207 } // namespace extensions 207 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698