OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef SHELL_APPLICATION_MANAGER_FETCHER_H_ | 5 #ifndef SHELL_APPLICATION_MANAGER_FETCHER_H_ |
6 #define SHELL_APPLICATION_MANAGER_FETCHER_H_ | 6 #define SHELL_APPLICATION_MANAGER_FETCHER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual std::string MimeType() = 0; | 56 virtual std::string MimeType() = 0; |
57 | 57 |
58 virtual bool HasMojoMagic() = 0; | 58 virtual bool HasMojoMagic() = 0; |
59 | 59 |
60 virtual bool PeekFirstLine(std::string* line) = 0; | 60 virtual bool PeekFirstLine(std::string* line) = 0; |
61 | 61 |
62 bool PeekContentHandler(std::string* mojo_shebang, | 62 bool PeekContentHandler(std::string* mojo_shebang, |
63 GURL* mojo_content_handler_url); | 63 GURL* mojo_content_handler_url); |
64 | 64 |
65 protected: | 65 protected: |
66 static const char kMojoMagic[]; | 66 static bool HasMojoMagic(const base::FilePath& path); |
67 static const size_t kMaxShebangLength; | 67 static bool PeekFirstLine(const base::FilePath& path, std::string* line); |
68 | 68 |
69 FetchCallback loader_callback_; | 69 FetchCallback loader_callback_; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace shell | 72 } // namespace shell |
73 | 73 |
74 #endif // SHELL_APPLICATION_MANAGER_FETCHER_H_ | 74 #endif // SHELL_APPLICATION_MANAGER_FETCHER_H_ |
OLD | NEW |