OLD | NEW |
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 "extensions/shell/browser/shell_nacl_browser_delegate.h" | 5 #include "extensions/shell/browser/shell_nacl_browser_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
| 9 #include "base/base_paths.h" |
9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
11 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
13 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/render_frame_host.h" | 16 #include "content/public/browser/render_frame_host.h" |
16 #include "content/public/browser/site_instance.h" | 17 #include "content/public/browser/site_instance.h" |
17 #include "extensions/browser/extension_system.h" | 18 #include "extensions/browser/extension_system.h" |
18 #include "extensions/browser/info_map.h" | 19 #include "extensions/browser/info_map.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // app_shell does not have infobars. | 77 // app_shell does not have infobars. |
77 LOG(ERROR) << "Missing architecture for pid " << render_process_id; | 78 LOG(ERROR) << "Missing architecture for pid " << render_process_id; |
78 } | 79 } |
79 | 80 |
80 bool ShellNaClBrowserDelegate::DialogsAreSuppressed() { | 81 bool ShellNaClBrowserDelegate::DialogsAreSuppressed() { |
81 return false; | 82 return false; |
82 } | 83 } |
83 | 84 |
84 bool ShellNaClBrowserDelegate::GetCacheDirectory(base::FilePath* cache_dir) { | 85 bool ShellNaClBrowserDelegate::GetCacheDirectory(base::FilePath* cache_dir) { |
85 // Just use the general cache directory, not a subdirectory like Chrome does. | 86 // Just use the general cache directory, not a subdirectory like Chrome does. |
| 87 #if defined(OS_POSIX) |
86 return PathService::Get(base::DIR_CACHE, cache_dir); | 88 return PathService::Get(base::DIR_CACHE, cache_dir); |
| 89 #elif defined(OS_WIN) |
| 90 // TODO(yoz): Find an appropriate persistent directory to use here. |
| 91 return PathService::Get(base::DIR_TEMP, cache_dir); |
| 92 #endif |
87 } | 93 } |
88 | 94 |
89 bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) { | 95 bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) { |
90 // On Posix, plugins are in the module directory. | 96 // On Posix, plugins are in the module directory. |
91 return PathService::Get(base::DIR_MODULE, plugin_dir); | 97 return PathService::Get(base::DIR_MODULE, plugin_dir); |
92 } | 98 } |
93 | 99 |
94 bool ShellNaClBrowserDelegate::GetPnaclDirectory(base::FilePath* pnacl_dir) { | 100 bool ShellNaClBrowserDelegate::GetPnaclDirectory(base::FilePath* pnacl_dir) { |
95 // On Posix, the pnacl directory is inside the plugin directory. | 101 // On Posix, the pnacl directory is inside the plugin directory. |
96 base::FilePath plugin_dir; | 102 base::FilePath plugin_dir; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 return base::Bind(&OnKeepalive); | 186 return base::Bind(&OnKeepalive); |
181 } | 187 } |
182 | 188 |
183 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( | 189 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( |
184 const base::FilePath& profile_directory, | 190 const base::FilePath& profile_directory, |
185 const GURL& manifest_url) { | 191 const GURL& manifest_url) { |
186 return false; | 192 return false; |
187 } | 193 } |
188 | 194 |
189 } // namespace extensions | 195 } // namespace extensions |
OLD | NEW |