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

Side by Side Diff: trunk/src/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 192283002: Revert 255858 "Simplify the user agent code some more since afte..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill_dialog_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" 32 #include "chrome/browser/ui/autofill/autofill_dialog_common.h"
33 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" 33 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h"
34 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" 34 #include "chrome/browser/ui/autofill/autofill_dialog_view.h"
35 #include "chrome/browser/ui/autofill/data_model_wrapper.h" 35 #include "chrome/browser/ui/autofill/data_model_wrapper.h"
36 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" 36 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h"
37 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" 37 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h"
38 #include "chrome/browser/ui/browser.h" 38 #include "chrome/browser/ui/browser.h"
39 #include "chrome/browser/ui/browser_finder.h" 39 #include "chrome/browser/ui/browser_finder.h"
40 #include "chrome/browser/ui/browser_navigator.h" 40 #include "chrome/browser/ui/browser_navigator.h"
41 #include "chrome/browser/ui/browser_window.h" 41 #include "chrome/browser/ui/browser_window.h"
42 #include "chrome/common/chrome_content_client.h"
43 #include "chrome/common/chrome_version_info.h" 42 #include "chrome/common/chrome_version_info.h"
44 #include "chrome/common/pref_names.h" 43 #include "chrome/common/pref_names.h"
45 #include "chrome/common/render_messages.h" 44 #include "chrome/common/render_messages.h"
46 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
47 #include "components/autofill/content/browser/risk/fingerprint.h" 46 #include "components/autofill/content/browser/risk/fingerprint.h"
48 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" 47 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h"
49 #include "components/autofill/content/browser/wallet/form_field_error.h" 48 #include "components/autofill/content/browser/wallet/form_field_error.h"
50 #include "components/autofill/content/browser/wallet/full_wallet.h" 49 #include "components/autofill/content/browser/wallet/full_wallet.h"
51 #include "components/autofill/content/browser/wallet/gaia_account.h" 50 #include "components/autofill/content/browser/wallet/gaia_account.h"
52 #include "components/autofill/content/browser/wallet/instrument.h" 51 #include "components/autofill/content/browser/wallet/instrument.h"
(...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 PrefService* user_prefs = profile_->GetPrefs(); 2707 PrefService* user_prefs = profile_->GetPrefs();
2709 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); 2708 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset);
2710 std::string accept_languages = 2709 std::string accept_languages =
2711 user_prefs->GetString(::prefs::kAcceptLanguages); 2710 user_prefs->GetString(::prefs::kAcceptLanguages);
2712 base::Time install_time = base::Time::FromTimeT( 2711 base::Time install_time = base::Time::FromTimeT(
2713 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate)); 2712 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate));
2714 2713
2715 risk::GetFingerprint( 2714 risk::GetFingerprint(
2716 obfuscated_gaia_id, window_bounds, *web_contents(), 2715 obfuscated_gaia_id, window_bounds, *web_contents(),
2717 chrome::VersionInfo().Version(), charset, accept_languages, install_time, 2716 chrome::VersionInfo().Version(), charset, accept_languages, install_time,
2718 g_browser_process->GetApplicationLocale(), GetUserAgent(), 2717 g_browser_process->GetApplicationLocale(),
2719 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, 2718 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData,
2720 weak_ptr_factory_.GetWeakPtr())); 2719 weak_ptr_factory_.GetWeakPtr()));
2721 } 2720 }
2722 2721
2723 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( 2722 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData(
2724 scoped_ptr<risk::Fingerprint> fingerprint) { 2723 scoped_ptr<risk::Fingerprint> fingerprint) {
2725 DCHECK(AreLegalDocumentsCurrent()); 2724 DCHECK(AreLegalDocumentsCurrent());
2726 2725
2727 std::string proto_data; 2726 std::string proto_data;
2728 fingerprint->SerializeToString(&proto_data); 2727 fingerprint->SerializeToString(&proto_data);
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3808 view_->UpdateButtonStrip(); 3807 view_->UpdateButtonStrip();
3809 } 3808 }
3810 3809
3811 void AutofillDialogControllerImpl::FetchWalletCookie() { 3810 void AutofillDialogControllerImpl::FetchWalletCookie() {
3812 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3811 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3813 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3812 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3814 signin_helper_->StartWalletCookieValueFetch(); 3813 signin_helper_->StartWalletCookieValueFetch();
3815 } 3814 }
3816 3815
3817 } // namespace autofill 3816 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698