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

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

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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/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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 212
213 // Append the piece whether it's bolded or not and move on to the next one. 213 // Append the piece whether it's bolded or not and move on to the next one.
214 contents_text_.append(piece); 214 contents_text_.append(piece);
215 pieces.erase(pieces.begin(), pieces.begin() + 1); 215 pieces.erase(pieces.begin(), pieces.begin() + 1);
216 } 216 }
217 217
218 // Add a "Learn more" link at the end of the header text if it's a generated 218 // Add a "Learn more" link at the end of the header text if it's a generated
219 // card bubble. 219 // card bubble.
220 base::string16 learn_more = l10n_util::GetStringUTF16(IDS_LEARN_MORE); 220 base::string16 learn_more = l10n_util::GetStringUTF16(IDS_LEARN_MORE);
221 contents_text_.append(ASCIIToUTF16(" ") + learn_more); 221 contents_text_.append(base::ASCIIToUTF16(" ") + learn_more);
222 const size_t header_size = contents_text_.size(); 222 const size_t header_size = contents_text_.size();
223 TextRange end_link; 223 TextRange end_link;
224 end_link.range = gfx::Range(header_size - learn_more.size(), header_size); 224 end_link.range = gfx::Range(header_size - learn_more.size(), header_size);
225 end_link.is_link = true; 225 end_link.is_link = true;
226 contents_text_ranges_.push_back(end_link); 226 contents_text_ranges_.push_back(end_link);
227 227
228 UpdateAnchor(); 228 UpdateAnchor();
229 229
230 if (ShouldDisplayBubbleInitially()) 230 if (ShouldDisplayBubbleInitially())
231 Show(false); 231 Show(false);
(...skipping 28 matching lines...) Expand all
260 if (browser && browser->window() && browser->window()->GetLocationBar()) 260 if (browser && browser->window() && browser->window()->GetLocationBar())
261 browser->window()->GetLocationBar()->UpdateGeneratedCreditCardView(); 261 browser->window()->GetLocationBar()->UpdateGeneratedCreditCardView();
262 } 262 }
263 263
264 void GeneratedCreditCardBubbleController::Hide() { 264 void GeneratedCreditCardBubbleController::Hide() {
265 if (bubble_ && !bubble_->IsHiding()) 265 if (bubble_ && !bubble_->IsHiding())
266 bubble_->Hide(); 266 bubble_->Hide();
267 } 267 }
268 268
269 } // namespace autofill 269 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698