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

Unified Diff: chrome/browser/profiles/incognito_helpers.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/profiles/incognito_helpers.cc
diff --git a/chrome/browser/profiles/incognito_helpers.cc b/chrome/browser/profiles/incognito_helpers.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6155e9606d67ca9f167fd7568f6fa858b3b166c5
--- /dev/null
+++ b/chrome/browser/profiles/incognito_helpers.cc
@@ -0,0 +1,21 @@
+// Copyright 2013 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 "chrome/browser/profiles/incognito_helpers.h"
+
+#include "chrome/browser/profiles/profile.h"
+
+namespace chrome {
+
+content::BrowserContext* GetBrowserContextRedirectedInIncognito(
+ content::BrowserContext* context) {
+ return static_cast<Profile*>(context)->GetOriginalProfile();
Elliot Glaysher 2013/04/30 00:11:12 The only thing that I worry about is the possibili
Paweł Hajdan Jr. 2013/04/30 18:07:56 Right, this is a reasonable concern. Note however,
Paweł Hajdan Jr. 2013/04/30 18:21:09 Actually it's not going to be easy because of usag
+}
+
+content::BrowserContext* GetBrowserContextOwnInstanceInIncognito(
+ content::BrowserContext* context) {
+ return context;
+}
+
+} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698