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 return PathService::Get(base::DIR_TEMP, cache_dir); | |
James Cook
2014/09/19 03:06:20
This at least needs a TODO -- if we ever run app_s
Yoyo Zhou
2014/09/23 02:01:05
Added a TODO.
ncbray: any suggestions?
| |
91 #endif | |
87 } | 92 } |
88 | 93 |
89 bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) { | 94 bool ShellNaClBrowserDelegate::GetPluginDirectory(base::FilePath* plugin_dir) { |
90 // On Posix, plugins are in the module directory. | 95 // On Posix, plugins are in the module directory. |
91 return PathService::Get(base::DIR_MODULE, plugin_dir); | 96 return PathService::Get(base::DIR_MODULE, plugin_dir); |
92 } | 97 } |
93 | 98 |
94 bool ShellNaClBrowserDelegate::GetPnaclDirectory(base::FilePath* pnacl_dir) { | 99 bool ShellNaClBrowserDelegate::GetPnaclDirectory(base::FilePath* pnacl_dir) { |
95 // On Posix, the pnacl directory is inside the plugin directory. | 100 // On Posix, the pnacl directory is inside the plugin directory. |
96 base::FilePath plugin_dir; | 101 base::FilePath plugin_dir; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 return base::Bind(&OnKeepalive); | 185 return base::Bind(&OnKeepalive); |
181 } | 186 } |
182 | 187 |
183 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( | 188 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( |
184 const base::FilePath& profile_directory, | 189 const base::FilePath& profile_directory, |
185 const GURL& manifest_url) { | 190 const GURL& manifest_url) { |
186 return false; | 191 return false; |
187 } | 192 } |
188 | 193 |
189 } // namespace extensions | 194 } // namespace extensions |
OLD | NEW |