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 #include "content/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 path_ = path_.Append(std::wstring(L"content_shell")); | 101 path_ = path_.Append(std::wstring(L"content_shell")); |
102 #elif defined(OS_LINUX) | 102 #elif defined(OS_LINUX) |
103 scoped_ptr<base::Environment> env(base::Environment::Create()); | 103 scoped_ptr<base::Environment> env(base::Environment::Create()); |
104 FilePath config_dir(base::nix::GetXDGDirectory(env.get(), | 104 FilePath config_dir(base::nix::GetXDGDirectory(env.get(), |
105 kXdgConfigHomeEnvVar, | 105 kXdgConfigHomeEnvVar, |
106 kDotConfigDir)); | 106 kDotConfigDir)); |
107 path_ = config_dir.Append("content_shell"); | 107 path_ = config_dir.Append("content_shell"); |
108 #elif defined(OS_MACOSX) | 108 #elif defined(OS_MACOSX) |
109 CHECK(PathService::Get(base::DIR_APP_DATA, &path_)); | 109 CHECK(PathService::Get(base::DIR_APP_DATA, &path_)); |
110 path_ = path_.Append("Chromium Content Shell"); | 110 path_ = path_.Append("Chromium Content Shell"); |
| 111 #elif defined(OS_ANDROID) |
| 112 DCHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path_)); |
| 113 path_ = path_.Append(FILE_PATH_LITERAL("content_shell")); |
111 #else | 114 #else |
112 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
113 #endif | 116 #endif |
114 | 117 |
115 if (!file_util::PathExists(path_)) | 118 if (!file_util::PathExists(path_)) |
116 file_util::CreateDirectory(path_); | 119 file_util::CreateDirectory(path_); |
117 } | 120 } |
118 | 121 |
119 FilePath ShellBrowserContext::GetPath() { | 122 FilePath ShellBrowserContext::GetPath() { |
120 return path_; | 123 return path_; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 179 |
177 bool ShellBrowserContext::DidLastSessionExitCleanly() { | 180 bool ShellBrowserContext::DidLastSessionExitCleanly() { |
178 return true; | 181 return true; |
179 } | 182 } |
180 | 183 |
181 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 184 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
182 return NULL; | 185 return NULL; |
183 } | 186 } |
184 | 187 |
185 } // namespace content | 188 } // namespace content |
OLD | NEW |