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

Unified Diff: chrome/browser/component_updater/chrome_component_updater_configurator.cc

Issue 1197243004: Replace some Tokenize calls with SplitString. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android Created 5 years, 6 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
Index: chrome/browser/component_updater/chrome_component_updater_configurator.cc
diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator.cc b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
index bdb1406543e6af3f20a3ac9beef90518c908241c..320b1175fed37ae658af9e2fdc212335eac3522f 100644
--- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc
+++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
@@ -10,11 +10,9 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/version.h"
-#if defined(OS_WIN)
-#include "base/win/win_util.h"
-#endif // OS_WIN
#include "build/build_config.h"
#include "chrome/browser/component_updater/component_patcher_operation_out_of_process.h"
#include "chrome/browser/component_updater/component_updater_url_constants.h"
@@ -26,6 +24,10 @@
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
+#if defined(OS_WIN)
+#include "base/win/win_util.h"
+#endif // OS_WIN
+
using update_client::Configurator;
using update_client::OutOfProcessPatcher;
@@ -151,10 +153,9 @@ ChromeConfigurator::ChromeConfigurator(
background_downloads_enabled_(false),
fallback_to_alt_source_url_enabled_(false) {
// Parse comma-delimited debug flags.
- std::vector<std::string> switch_values;
- Tokenize(cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
- ",",
- &switch_values);
+ std::vector<std::string> switch_values = base::SplitString(
+ cmdline->GetSwitchValueASCII(switches::kComponentUpdater),
+ ",", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
fast_update_ = HasSwitchValue(switch_values, kSwitchFastUpdate);
pings_enabled_ = !HasSwitchValue(switch_values, kSwitchDisablePings);
deltas_enabled_ = !HasSwitchValue(switch_values, kSwitchDisableDeltaUpdates);
« no previous file with comments | « chrome/browser/chromeos/input_method/textinput_test_helper.cc ('k') | chrome/browser/devtools/device/adb/adb_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698