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

Unified Diff: chrome/common/importer/firefox_importer_utils.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/renderer/pepper/pepper_uma_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/importer/firefox_importer_utils.cc
diff --git a/chrome/common/importer/firefox_importer_utils.cc b/chrome/common/importer/firefox_importer_utils.cc
index 76a76a2c5e3de9da00d3a0370979dd6eb8a45008..e1f5ada77718755f5a59d78e63a14e500330e002 100644
--- a/chrome/common/importer/firefox_importer_utils.cc
+++ b/chrome/common/importer/firefox_importer_utils.cc
@@ -311,10 +311,11 @@ base::string16 GetFirefoxImporterName(const base::FilePath& app_path) {
if (line == "[App]") {
in_app_section = true;
} else if (in_app_section) {
- if (line.find(name_attr) == 0) {
+ if (base::StartsWith(line, name_attr, base::CompareCase::SENSITIVE)) {
line.substr(name_attr.size()).CopyToString(&branding_name);
break;
- } else if (line.length() > 0 && line[0] == '[') {
+ }
+ if (line.length() > 0 && line[0] == '[') {
// No longer in the [App] section.
break;
}
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/renderer/pepper/pepper_uma_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698