Fix temp dir path for Android.

"/data/local/tmp" is not writable by applications.
BUG=125059

TEST=


Review URL: https://chromiumcodereview.appspot.com/10332218

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137719 0039d316-1c4b-4281-b951-d872f2087c98
parent 1a6cec70
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_util.h"
#include "base/file_path.h"
#include "base/path_service.h"
namespace file_util {
bool GetShmemTempDir(FilePath* path, bool executable) {
*path = FilePath("/data/local/tmp");
return true;
return PathService::Get(base::DIR_CACHE, path);
}
} // namespace file_util
......@@ -38,6 +38,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
......@@ -920,7 +921,7 @@ bool GetTempDir(FilePath* path) {
*path = FilePath(tmp);
else
#if defined(OS_ANDROID)
*path = FilePath("/data/local/tmp");
return PathService::Get(base::DIR_CACHE, path);
#else
*path = FilePath("/tmp");
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment