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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_factory.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots 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/chromeos/extensions/file_manager/file_browser_private_api_factory.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_factory.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_factory.cc
index 992c03499eb1c7229b163f0b8324f2750abf9401..fba99de0d66a9acadf68af6a74d231e497e9decb 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_factory.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_factory.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/chromeos/drive/drive_system_service.h"
#include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.h"
#include "chrome/browser/extensions/extension_system_factory.h"
+#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
@@ -39,11 +40,10 @@ ProfileKeyedService* FileBrowserPrivateAPIFactory::BuildServiceInstanceFor(
return new FileBrowserPrivateAPI(static_cast<Profile*>(profile));
}
-bool FileBrowserPrivateAPIFactory::ServiceHasOwnInstanceInIncognito() const {
- // Explicitly and always allow this router in guest login mode. See
- // chrome/browser/profiles/profile_keyed_base_factory.h comment
- // for the details.
- return true;
+content::BrowserContext* FileBrowserPrivateAPIFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ // Explicitly and always allow this router in guest login mode.
+ return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}
bool FileBrowserPrivateAPIFactory::ServiceIsCreatedWithProfile() const {

Powered by Google App Engine
This is Rietveld 408576698