Commit 64d60d0d authored by acleung@chromium.org's avatar acleung@chromium.org

Do not do infobar auto login in Incognito.

BUG=367915

Review URL: https://codereview.chromium.org/309773003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274630 0039d316-1c4b-4281-b951-d872f2087c98
parent f9df349d
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "url/gurl.h" #include "url/gurl.h"
using content::BrowserThread; using content::BrowserThread;
using content::BrowserContext;
using content::WebContents; using content::WebContents;
AutoLoginPrompter::AutoLoginPrompter(WebContents* web_contents, AutoLoginPrompter::AutoLoginPrompter(WebContents* web_contents,
...@@ -73,9 +74,11 @@ void AutoLoginPrompter::ShowInfoBarUIThread(Params params, ...@@ -73,9 +74,11 @@ void AutoLoginPrompter::ShowInfoBarUIThread(Params params,
if (!web_contents) if (!web_contents)
return; return;
Profile* profile = BrowserContext* context = web_contents->GetBrowserContext();
Profile::FromBrowserContext(web_contents->GetBrowserContext()); if (context->IsOffTheRecord())
return;
Profile* profile = Profile::FromBrowserContext(context);
if (!profile->GetPrefs()->GetBoolean(prefs::kAutologinEnabled)) if (!profile->GetPrefs()->GetBoolean(prefs::kAutologinEnabled))
return; return;
......
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