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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 11414286: Remove unneeded TabContents::FromWebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years 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/ui/sync/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index b27b27b0e1677f5211244465bfa38ec1d1220de8..964bb326956a9d79d2cf7829963680adaebe5f0d 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -32,7 +32,6 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/sync/one_click_signin_histogram.h"
#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/net/url_util.h"
@@ -337,17 +336,17 @@ void OneClickInfoBarDelegateImpl::GetAlternateColors(
}
void OneClickInfoBarDelegateImpl::DisableOneClickSignIn() {
- PrefService* pref_service =
- TabContents::FromWebContents(owner()->GetWebContents())->
- profile()->GetPrefs();
+ Profile* profile = Profile::FromBrowserContext(
+ owner()->GetWebContents()->GetBrowserContext());
+ PrefService* pref_service = profile->GetPrefs();
pref_service->SetBoolean(prefs::kReverseAutologinEnabled, false);
}
void OneClickInfoBarDelegateImpl::AddEmailToOneClickRejectedList(
const std::string& email) {
- PrefService* pref_service =
- TabContents::FromWebContents(owner()->GetWebContents())->
- profile()->GetPrefs();
+ Profile* profile = Profile::FromBrowserContext(
+ owner()->GetWebContents()->GetBrowserContext());
+ PrefService* pref_service = profile->GetPrefs();
ListPrefUpdate updater(pref_service,
prefs::kReverseAutologinRejectedEmailList);
updater->AppendIfNotPresent(new base::StringValue(email));
« no previous file with comments | « chrome/browser/ui/pdf/pdf_unsupported_feature.cc ('k') | chrome/browser/ui/views/web_intent_picker_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698