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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h

Issue 224883008: Sniff MIME type for files which have unknown extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and omit binary file. Created 6 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
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 // This file provides task related API functions. 5 // This file provides task related API functions.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
9 9
10 #include <vector>
11
10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" 12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
13 #include "chrome/browser/chromeos/file_manager/file_tasks.h"
11 #include "chrome/common/extensions/api/file_browser_private.h" 14 #include "chrome/common/extensions/api/file_browser_private.h"
12 15
13 namespace extensions { 16 namespace extensions {
14 17
15 // Implements the chrome.fileBrowserPrivate.executeTask method. 18 // Implements the chrome.fileBrowserPrivate.executeTask method.
16 class FileBrowserPrivateExecuteTaskFunction 19 class FileBrowserPrivateExecuteTaskFunction
17 : public LoggedAsyncExtensionFunction { 20 : public LoggedAsyncExtensionFunction {
18 public: 21 public:
19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask", 22 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
20 FILEBROWSERPRIVATE_EXECUTETASK) 23 FILEBROWSERPRIVATE_EXECUTETASK)
(...skipping 14 matching lines...) Expand all
35 : public LoggedAsyncExtensionFunction { 38 : public LoggedAsyncExtensionFunction {
36 public: 39 public:
37 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks", 40 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
38 FILEBROWSERPRIVATE_GETFILETASKS) 41 FILEBROWSERPRIVATE_GETFILETASKS)
39 42
40 protected: 43 protected:
41 virtual ~FileBrowserPrivateGetFileTasksFunction() {} 44 virtual ~FileBrowserPrivateGetFileTasksFunction() {}
42 45
43 // AsyncExtensionFunction overrides. 46 // AsyncExtensionFunction overrides.
44 virtual bool RunImpl() OVERRIDE; 47 virtual bool RunImpl() OVERRIDE;
48
49 private:
50 void OnSniffingMimeTypeCompleted(
51 scoped_ptr<app_file_handler_util::PathAndMimeTypeSet> path_mime_set,
52 scoped_ptr<std::vector<GURL> > file_urls);
45 }; 53 };
46 54
47 // Implements the chrome.fileBrowserPrivate.setDefaultTask method. 55 // Implements the chrome.fileBrowserPrivate.setDefaultTask method.
48 class FileBrowserPrivateSetDefaultTaskFunction 56 class FileBrowserPrivateSetDefaultTaskFunction
49 : public ChromeSyncExtensionFunction { 57 : public ChromeSyncExtensionFunction {
50 public: 58 public:
51 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask", 59 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
52 FILEBROWSERPRIVATE_SETDEFAULTTASK) 60 FILEBROWSERPRIVATE_SETDEFAULTTASK)
53 61
54 protected: 62 protected:
55 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {} 63 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {}
56 64
57 // SyncExtensionFunction overrides. 65 // SyncExtensionFunction overrides.
58 virtual bool RunImpl() OVERRIDE; 66 virtual bool RunImpl() OVERRIDE;
59 }; 67 };
60 68
61 } // namespace extensions 69 } // namespace extensions
62 70
63 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ 71 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698