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

Side by Side Diff: components/autofill/browser/autocheckout_manager.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "components/autofill/browser/autocheckout_manager.h" 5 #include "components/autofill/browser/autocheckout_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "components/autofill/browser/autocheckout_request_manager.h" 10 #include "components/autofill/browser/autocheckout_request_manager.h"
11 #include "components/autofill/browser/autofill_country.h" 11 #include "components/autofill/browser/autofill_country.h"
12 #include "components/autofill/browser/autofill_field.h" 12 #include "components/autofill/browser/autofill_field.h"
13 #include "components/autofill/browser/autofill_manager.h" 13 #include "components/autofill/browser/autofill_manager.h"
14 #include "components/autofill/browser/autofill_metrics.h" 14 #include "components/autofill/browser/autofill_metrics.h"
15 #include "components/autofill/browser/autofill_profile.h" 15 #include "components/autofill/browser/autofill_profile.h"
16 #include "components/autofill/browser/credit_card.h" 16 #include "components/autofill/browser/credit_card.h"
17 #include "components/autofill/browser/field_types.h" 17 #include "components/autofill/browser/field_types.h"
18 #include "components/autofill/browser/form_structure.h" 18 #include "components/autofill/browser/form_structure.h"
19 #include "components/autofill/common/autofill_messages.h" 19 #include "components/autofill/common/autofill_messages.h"
20 #include "components/autofill/common/form_data.h" 20 #include "components/autofill/common/form_data.h"
21 #include "components/autofill/common/form_field_data.h" 21 #include "components/autofill/common/form_field_data.h"
22 #include "components/autofill/common/web_element_descriptor.h" 22 #include "components/autofill/common/web_element_descriptor.h"
23 // TODO(jam) remove once https://codereview.chromium.org/13488009/ lands, since
24 // that brings localle to AutofillManager.
25 #include "content/public/browser/content_browser_client.h"
26 #include "content/public/browser/render_view_host.h" 23 #include "content/public/browser/render_view_host.h"
27 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
28 #include "content/public/common/ssl_status.h" 25 #include "content/public/common/ssl_status.h"
29 #include "googleurl/src/gurl.h" 26 #include "googleurl/src/gurl.h"
30 #include "ui/gfx/rect.h" 27 #include "ui/gfx/rect.h"
31 28
32 using content::RenderViewHost; 29 using content::RenderViewHost;
33 using content::SSLStatus; 30 using content::SSLStatus;
34 using content::WebContents; 31 using content::WebContents;
35 32
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 cvv_ = result->field(i)->value; 284 cvv_ = result->field(i)->value;
288 continue; 285 continue;
289 } 286 }
290 if (AutofillType(type).group() == AutofillType::CREDIT_CARD) { 287 if (AutofillType(type).group() == AutofillType::CREDIT_CARD) {
291 credit_card_->SetRawInfo(result->field(i)->type(), 288 credit_card_->SetRawInfo(result->field(i)->type(),
292 result->field(i)->value); 289 result->field(i)->value);
293 } else if (result->field(i)->type() == ADDRESS_HOME_COUNTRY || 290 } else if (result->field(i)->type() == ADDRESS_HOME_COUNTRY ||
294 result->field(i)->type() == ADDRESS_BILLING_COUNTRY) { 291 result->field(i)->type() == ADDRESS_BILLING_COUNTRY) {
295 profile_->SetInfo(result->field(i)->type(), 292 profile_->SetInfo(result->field(i)->type(),
296 result->field(i)->value, 293 result->field(i)->value,
297 // TODO(jam) remove once 294 autofill_manager_->app_locale());
298 // https://codereview.chromium.org/13488009/
299 // lands, since that brings localle to AutofillManager.
300 content::GetContentClient()->browser()->
301 GetApplicationLocale());
302 } else { 295 } else {
303 profile_->SetRawInfo(result->field(i)->type(), result->field(i)->value); 296 profile_->SetRawInfo(result->field(i)->type(), result->field(i)->value);
304 } 297 }
305 } 298 }
306 299
307 // Add 1.0 since page numbers are 0-indexed. 300 // Add 1.0 since page numbers are 0-indexed.
308 autofill_manager_->delegate()->UpdateProgressBar( 301 autofill_manager_->delegate()->UpdateProgressBar(
309 (1.0 + page_meta_data_->current_page_number) / 302 (1.0 + page_meta_data_->current_page_number) /
310 page_meta_data_->total_pages); 303 page_meta_data_->total_pages);
311 FillForms(); 304 FillForms();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 google_transaction_id_); 375 google_transaction_id_);
383 376
384 // Log the result of this Autocheckout flow to UMA. 377 // Log the result of this Autocheckout flow to UMA.
385 metric_logger_->LogAutocheckoutBuyFlowMetric( 378 metric_logger_->LogAutocheckoutBuyFlowMetric(
386 AutocheckoutStatusToUmaMetric(status)); 379 AutocheckoutStatusToUmaMetric(status));
387 380
388 google_transaction_id_ = kTransactionIdNotSet; 381 google_transaction_id_ = kTransactionIdNotSet;
389 } 382 }
390 383
391 } // namespace autofill 384 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/browser/android/personal_data_manager_android.cc ('k') | components/autofill/browser/risk/fingerprint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698