| OLD | NEW |
| 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/generated_credit_card_bubble_controller.h" | 5 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" |
| 6 | 6 |
| 7 #include <climits> | 7 #include <climits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 DEFINE_WEB_CONTENTS_USER_DATA_KEY( | 32 DEFINE_WEB_CONTENTS_USER_DATA_KEY( |
| 33 autofill::GeneratedCreditCardBubbleController); | 33 autofill::GeneratedCreditCardBubbleController); |
| 34 | 34 |
| 35 namespace autofill { | 35 namespace autofill { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 static const int kMaxGeneratedCardTimesToShow = INT_MAX; | 39 static const int kMaxGeneratedCardTimesToShow = INT_MAX; |
| 40 static const base::char16 kRangeSeparator = '|'; | 40 static const base::char16 kRangeSeparator = '|'; |
| 41 static const char kWalletGeneratedCardLearnMoreLink[] = | 41 static const char kWalletGeneratedCardLearnMoreLink[] = |
| 42 "http://support.google.com/wallet/bin/answer.py?hl=en&answer=2740044"; | 42 "https://support.google.com/wallet/answer/2740044"; |
| 43 | 43 |
| 44 GeneratedCreditCardBubbleController* GetOrCreate(content::WebContents* wc) { | 44 GeneratedCreditCardBubbleController* GetOrCreate(content::WebContents* wc) { |
| 45 GeneratedCreditCardBubbleController::CreateForWebContents(wc); | 45 GeneratedCreditCardBubbleController::CreateForWebContents(wc); |
| 46 return GeneratedCreditCardBubbleController::FromWebContents(wc); | 46 return GeneratedCreditCardBubbleController::FromWebContents(wc); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 bool TextRange::operator==(const TextRange& other) const { | 51 bool TextRange::operator==(const TextRange& other) const { |
| 52 return other.range == range && other.is_link == is_link; | 52 return other.range == range && other.is_link == is_link; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 if (browser && browser->window() && browser->window()->GetLocationBar()) | 261 if (browser && browser->window() && browser->window()->GetLocationBar()) |
| 262 browser->window()->GetLocationBar()->UpdateGeneratedCreditCardView(); | 262 browser->window()->GetLocationBar()->UpdateGeneratedCreditCardView(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void GeneratedCreditCardBubbleController::Hide() { | 265 void GeneratedCreditCardBubbleController::Hide() { |
| 266 if (bubble_ && !bubble_->IsHiding()) | 266 if (bubble_ && !bubble_->IsHiding()) |
| 267 bubble_->Hide(); | 267 bubble_->Hide(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace autofill | 270 } // namespace autofill |
| OLD | NEW |