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

Side by Side Diff: chrome/browser/importer/profile_writer.cc

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_storage_monitor.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/importer/profile_writer.h" 5 #include "chrome/browser/importer/profile_writer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 existing_folder_names.insert(node->GetTitle()); 54 existing_folder_names.insert(node->GetTitle());
55 } 55 }
56 56
57 // If the given name is unique, use it. 57 // If the given name is unique, use it.
58 if (existing_folder_names.find(folder_name) == existing_folder_names.end()) 58 if (existing_folder_names.find(folder_name) == existing_folder_names.end())
59 return folder_name; 59 return folder_name;
60 60
61 // Otherwise iterate until we find a unique name. 61 // Otherwise iterate until we find a unique name.
62 for (size_t i = 1; i <= existing_folder_names.size(); ++i) { 62 for (size_t i = 1; i <= existing_folder_names.size(); ++i) {
63 base::string16 name = folder_name + base::ASCIIToUTF16(" (") + 63 base::string16 name = folder_name + base::ASCIIToUTF16(" (") +
64 base::IntToString16(i) + base::ASCIIToUTF16(")"); 64 base::SizeTToString16(i) + base::ASCIIToUTF16(")");
65 if (existing_folder_names.find(name) == existing_folder_names.end()) 65 if (existing_folder_names.find(name) == existing_folder_names.end())
66 return name; 66 return name;
67 } 67 }
68 68
69 NOTREACHED(); 69 NOTREACHED();
70 return folder_name; 70 return folder_name;
71 } 71 }
72 72
73 // Shows the bookmarks toolbar. 73 // Shows the bookmarks toolbar.
74 void ShowBookmarkBar(Profile* profile) { 74 void ShowBookmarkBar(Profile* profile) {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 void ProfileWriter::AddAutofillFormDataEntries( 338 void ProfileWriter::AddAutofillFormDataEntries(
339 const std::vector<autofill::AutofillEntry>& autofill_entries) { 339 const std::vector<autofill::AutofillEntry>& autofill_entries) {
340 scoped_refptr<autofill::AutofillWebDataService> web_data_service = 340 scoped_refptr<autofill::AutofillWebDataService> web_data_service =
341 WebDataServiceFactory::GetAutofillWebDataForProfile( 341 WebDataServiceFactory::GetAutofillWebDataForProfile(
342 profile_, ServiceAccessType::EXPLICIT_ACCESS); 342 profile_, ServiceAccessType::EXPLICIT_ACCESS);
343 if (web_data_service.get()) 343 if (web_data_service.get())
344 web_data_service->UpdateAutofillEntries(autofill_entries); 344 web_data_service->UpdateAutofillEntries(autofill_entries);
345 } 345 }
346 346
347 ProfileWriter::~ProfileWriter() {} 347 ProfileWriter::~ProfileWriter() {}
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_storage_monitor.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698