| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 9 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 PrefService* ChromeAutofillClient::GetPrefs() { | 102 PrefService* ChromeAutofillClient::GetPrefs() { |
| 103 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()) | 103 return Profile::FromBrowserContext(web_contents()->GetBrowserContext()) |
| 104 ->GetPrefs(); | 104 ->GetPrefs(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 IdentityProvider* ChromeAutofillClient::GetIdentityProvider() { | 107 IdentityProvider* ChromeAutofillClient::GetIdentityProvider() { |
| 108 if (!identity_provider_) { | 108 if (!identity_provider_) { |
| 109 Profile* profile = | 109 Profile* profile = |
| 110 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 110 Profile::FromBrowserContext(web_contents()->GetBrowserContext())-> |
| 111 GetOriginalProfile(); |
| 111 LoginUIService* login_service = nullptr; | 112 LoginUIService* login_service = nullptr; |
| 112 #if !defined(OS_ANDROID) | 113 #if !defined(OS_ANDROID) |
| 113 login_service = LoginUIServiceFactory::GetForProfile(profile); | 114 login_service = LoginUIServiceFactory::GetForProfile(profile); |
| 114 #endif | 115 #endif |
| 115 identity_provider_.reset(new ProfileIdentityProvider( | 116 identity_provider_.reset(new ProfileIdentityProvider( |
| 116 SigninManagerFactory::GetForProfile(profile), | 117 SigninManagerFactory::GetForProfile(profile), |
| 117 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 118 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 118 login_service)); | 119 login_service)); |
| 119 } | 120 } |
| 120 | 121 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 289 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
| 289 } | 290 } |
| 290 | 291 |
| 291 void ChromeAutofillClient::LinkClicked(const GURL& url, | 292 void ChromeAutofillClient::LinkClicked(const GURL& url, |
| 292 WindowOpenDisposition disposition) { | 293 WindowOpenDisposition disposition) { |
| 293 web_contents()->OpenURL(content::OpenURLParams( | 294 web_contents()->OpenURL(content::OpenURLParams( |
| 294 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); | 295 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); |
| 295 } | 296 } |
| 296 | 297 |
| 297 } // namespace autofill | 298 } // namespace autofill |
| OLD | NEW |