OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ |
6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/containers/mru_cache.h" | 9 #include "base/containers/mru_cache.h" |
10 #include "base/files/file_util_proxy.h" | 10 #include "base/files/file_util_proxy.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // TODO(ncbray): move the cache onto NaClProcessHost so that we don't need to | 102 // TODO(ncbray): move the cache onto NaClProcessHost so that we don't need to |
103 // rely on tokens being unguessable by another process. | 103 // rely on tokens being unguessable by another process. |
104 void PutFilePath(const base::FilePath& path, uint64* file_token_lo, | 104 void PutFilePath(const base::FilePath& path, uint64* file_token_lo, |
105 uint64* file_token_hi); | 105 uint64* file_token_hi); |
106 bool GetFilePath(uint64 file_token_lo, uint64 file_token_hi, | 106 bool GetFilePath(uint64 file_token_lo, uint64 file_token_hi, |
107 base::FilePath* path); | 107 base::FilePath* path); |
108 | 108 |
109 bool QueryKnownToValidate(const std::string& signature, bool off_the_record); | 109 bool QueryKnownToValidate(const std::string& signature, bool off_the_record); |
110 void SetKnownToValidate(const std::string& signature, bool off_the_record); | 110 void SetKnownToValidate(const std::string& signature, bool off_the_record); |
111 void ClearValidationCache(const base::Closure& callback); | 111 void ClearValidationCache(const base::Closure& callback); |
| 112 #if defined(OS_WIN) |
| 113 // Get path to NaCl loader on the filesystem if possible. |
| 114 // |exe_path| does not change if the method fails. |
| 115 bool GetNaCl64ExePath(base::FilePath* exe_path); |
| 116 #endif |
112 | 117 |
113 private: | 118 private: |
114 friend struct DefaultSingletonTraits<NaClBrowser>; | 119 friend struct DefaultSingletonTraits<NaClBrowser>; |
115 | 120 |
116 enum NaClResourceState { | 121 enum NaClResourceState { |
117 NaClResourceUninitialized, | 122 NaClResourceUninitialized, |
118 NaClResourceRequested, | 123 NaClResourceRequested, |
119 NaClResourceReady | 124 NaClResourceReady |
120 }; | 125 }; |
121 | 126 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 169 |
165 bool ok_; | 170 bool ok_; |
166 | 171 |
167 // A list of pending tasks to start NaCl processes. | 172 // A list of pending tasks to start NaCl processes. |
168 std::vector<base::Closure> waiting_; | 173 std::vector<base::Closure> waiting_; |
169 | 174 |
170 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 175 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); |
171 }; | 176 }; |
172 | 177 |
173 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 178 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ |
OLD | NEW |