Chromium Code Reviews| Index: chrome/browser/ui/android/infobars/auto_login_prompter.cc |
| diff --git a/chrome/browser/ui/android/infobars/auto_login_prompter.cc b/chrome/browser/ui/android/infobars/auto_login_prompter.cc |
| index 7d50998db20e2d753ba7720f2004ac064baed927..352db930705f51e5cad3b5b43519b76f7ea3bb1c 100644 |
| --- a/chrome/browser/ui/android/infobars/auto_login_prompter.cc |
| +++ b/chrome/browser/ui/android/infobars/auto_login_prompter.cc |
| @@ -24,6 +24,7 @@ |
| #include "url/gurl.h" |
| using content::BrowserThread; |
| +using content::BrowserContext; |
| using content::WebContents; |
| AutoLoginPrompter::AutoLoginPrompter(WebContents* web_contents, |
| @@ -73,8 +74,12 @@ void AutoLoginPrompter::ShowInfoBarUIThread(Params params, |
| if (!web_contents) |
| return; |
| - Profile* profile = |
| - Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| + BrowserContext* context = web_contents->GetBrowserContext(); |
| + |
|
gone
2014/06/02 23:27:05
nit: remove empty line
acleung1
2014/06/03 17:15:32
Done.
|
| + if (context->IsOffTheRecord()) |
| + return; |
| + |
| + Profile* profile = Profile::FromBrowserContext(context); |
|
gone
2014/06/02 23:27:05
this one too?
acleung1
2014/06/03 17:15:32
Done.
|
| if (!profile->GetPrefs()->GetBoolean(prefs::kAutologinEnabled)) |
| return; |