Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: content/shell/shell_browser_context.cc

Issue 10544050: Set the Android disk cache location (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698