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

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

Issue 370813003: Move kInstallDate from chrome/common/pref_names.h to components/metrics/metrics_pref_names.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review:isherman Created 6 years, 5 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "components/autofill/core/browser/address_i18n.h" 57 #include "components/autofill/core/browser/address_i18n.h"
58 #include "components/autofill/core/browser/autofill_country.h" 58 #include "components/autofill/core/browser/autofill_country.h"
59 #include "components/autofill/core/browser/autofill_data_model.h" 59 #include "components/autofill/core/browser/autofill_data_model.h"
60 #include "components/autofill/core/browser/autofill_manager.h" 60 #include "components/autofill/core/browser/autofill_manager.h"
61 #include "components/autofill/core/browser/autofill_type.h" 61 #include "components/autofill/core/browser/autofill_type.h"
62 #include "components/autofill/core/browser/personal_data_manager.h" 62 #include "components/autofill/core/browser/personal_data_manager.h"
63 #include "components/autofill/core/browser/phone_number_i18n.h" 63 #include "components/autofill/core/browser/phone_number_i18n.h"
64 #include "components/autofill/core/browser/validation.h" 64 #include "components/autofill/core/browser/validation.h"
65 #include "components/autofill/core/common/autofill_pref_names.h" 65 #include "components/autofill/core/common/autofill_pref_names.h"
66 #include "components/autofill/core/common/form_data.h" 66 #include "components/autofill/core/common/form_data.h"
67 #include "components/metrics/metrics_service.h"
67 #include "components/pref_registry/pref_registry_syncable.h" 68 #include "components/pref_registry/pref_registry_syncable.h"
68 #include "content/public/browser/browser_thread.h" 69 #include "content/public/browser/browser_thread.h"
69 #include "content/public/browser/geolocation_provider.h" 70 #include "content/public/browser/geolocation_provider.h"
70 #include "content/public/browser/navigation_controller.h" 71 #include "content/public/browser/navigation_controller.h"
71 #include "content/public/browser/navigation_details.h" 72 #include "content/public/browser/navigation_details.h"
72 #include "content/public/browser/navigation_entry.h" 73 #include "content/public/browser/navigation_entry.h"
73 #include "content/public/browser/notification_service.h" 74 #include "content/public/browser/notification_service.h"
74 #include "content/public/browser/notification_types.h" 75 #include "content/public/browser/notification_types.h"
75 #include "content/public/browser/render_view_host.h" 76 #include "content/public/browser/render_view_host.h"
76 #include "content/public/browser/web_contents.h" 77 #include "content/public/browser/web_contents.h"
(...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 DCHECK(success); 2887 DCHECK(success);
2887 2888
2888 gfx::Rect window_bounds; 2889 gfx::Rect window_bounds;
2889 window_bounds = GetBaseWindowForWebContents(web_contents())->GetBounds(); 2890 window_bounds = GetBaseWindowForWebContents(web_contents())->GetBounds();
2890 2891
2891 PrefService* user_prefs = profile_->GetPrefs(); 2892 PrefService* user_prefs = profile_->GetPrefs();
2892 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); 2893 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset);
2893 std::string accept_languages = 2894 std::string accept_languages =
2894 user_prefs->GetString(::prefs::kAcceptLanguages); 2895 user_prefs->GetString(::prefs::kAcceptLanguages);
2895 base::Time install_time = base::Time::FromTimeT( 2896 base::Time install_time = base::Time::FromTimeT(
2896 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate)); 2897 g_browser_process->metrics_service()->GetInstallDate());
2897 2898
2898 risk::GetFingerprint( 2899 risk::GetFingerprint(
2899 obfuscated_gaia_id, window_bounds, web_contents(), 2900 obfuscated_gaia_id, window_bounds, web_contents(),
2900 chrome::VersionInfo().Version(), charset, accept_languages, install_time, 2901 chrome::VersionInfo().Version(), charset, accept_languages, install_time,
2901 g_browser_process->GetApplicationLocale(), GetUserAgent(), 2902 g_browser_process->GetApplicationLocale(), GetUserAgent(),
2902 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, 2903 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData,
2903 weak_ptr_factory_.GetWeakPtr())); 2904 weak_ptr_factory_.GetWeakPtr()));
2904 } 2905 }
2905 2906
2906 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( 2907 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData(
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 view_->UpdateButtonStrip(); 4164 view_->UpdateButtonStrip();
4164 } 4165 }
4165 4166
4166 void AutofillDialogControllerImpl::FetchWalletCookie() { 4167 void AutofillDialogControllerImpl::FetchWalletCookie() {
4167 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 4168 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
4168 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 4169 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
4169 signin_helper_->StartWalletCookieValueFetch(); 4170 signin_helper_->StartWalletCookieValueFetch();
4170 } 4171 }
4171 4172
4172 } // namespace autofill 4173 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698