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

Unified Diff: chrome/browser/extensions/convert_web_app.cc

Issue 6297003: Fail gracefully if profile Temp dir can not be accessed. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Address rev comments. Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/convert_user_script.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/convert_web_app.cc
diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc
index e1c8c92e406ede2c2d17e0a791d0814ab0e6340b..d410f2a99c63d2e42f1850a26d005bfe7d76036e 100644
--- a/chrome/browser/extensions/convert_web_app.cc
+++ b/chrome/browser/extensions/convert_web_app.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -22,6 +22,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
+#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/json_value_serializer.h"
#include "chrome/common/web_apps.h"
#include "gfx/codec/png_codec.h"
@@ -84,8 +85,11 @@ std::string ConvertTimeToExtensionVersion(const Time& create_time) {
scoped_refptr<Extension> ConvertWebAppToExtension(
const WebApplicationInfo& web_app,
const Time& create_time) {
- FilePath user_data_temp_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA_TEMP, &user_data_temp_dir));
+ FilePath user_data_temp_dir = extension_file_util::GetUserDataTempDir();
+ if (user_data_temp_dir.empty()) {
+ LOG(ERROR) << "Could not get path to profile temporary directory.";
+ return NULL;
+ }
ScopedTempDir temp_dir;
if (!temp_dir.CreateUniqueTempDirUnderPath(user_data_temp_dir)) {
« no previous file with comments | « chrome/browser/extensions/convert_user_script.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698