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

Unified Diff: base/path_service.h

Issue 10306009: Make sure only the main browser process and service proceses are allowed to create the profile dire… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add gpu to the list of allowed processes. Created 8 years, 8 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 | « no previous file | base/path_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/path_service.h
diff --git a/base/path_service.h b/base/path_service.h
index 4b297385dfb8494ed9c4c68f43f9b8fd3596d3c2..03e4b44491e891d3a959d6c7421cc41c03462ea2 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -1,4 +1,4 @@
-// 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.
@@ -40,6 +40,13 @@ class BASE_EXPORT PathService {
// over the lifetime of the app, so this method should be used with caution.
static bool Override(int key, const FilePath& path);
+ // This function does the same as PathService::Override but it takes an extra
+ // parameter |create| which guides whether the directory to be overriden must
+ // be created in case it doesn't exist already.
+ static bool OverrideAndCreateIfNeeded(int key,
+ const FilePath& path,
+ bool create);
+
// To extend the set of supported keys, you can register a path provider,
// which is just a function mirroring PathService::Get. The ProviderFunc
// returns false if it cannot provide a non-empty path for the given key.
« no previous file with comments | « no previous file | base/path_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698