diff options
author | kulkarni.a <kulkarni.a@samsung.com> | 2014-09-30 01:54:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-30 08:55:55 +0000 |
commit | db60fc29b755f1cc3e7846497cb54222e3f391de (patch) | |
tree | 8ac79e5f16c40328a07e6ab154dc7ceafb4efa8d | |
parent | e372e4f4bbcb94a6ff427b337845ad452133e527 (diff) | |
download | chromium_src-db60fc29b755f1cc3e7846497cb54222e3f391de.zip chromium_src-db60fc29b755f1cc3e7846497cb54222e3f391de.tar.gz chromium_src-db60fc29b755f1cc3e7846497cb54222e3f391de.tar.bz2 |
Reusing the base::StringPairs in src/components/*
Reusing the "base::StringPairs" insted of "std::vector<std::pair<std::string, std::string> >"
same is defined in base/strings/string_split.h.
BUG=412250
Review URL: https://codereview.chromium.org/593113002
Cr-Commit-Position: refs/heads/master@{#297387}
4 files changed, 8 insertions, 4 deletions
diff --git a/components/leveldb_proto/proto_database_impl.h b/components/leveldb_proto/proto_database_impl.h index 1b1c740..cfa9bd6 100644 --- a/components/leveldb_proto/proto_database_impl.h +++ b/components/leveldb_proto/proto_database_impl.h @@ -16,12 +16,13 @@ #include "base/strings/string_util.h" #include "base/threading/sequenced_worker_pool.h" #include "base/threading/thread_checker.h" +#include "base/strings/string_split.h" #include "components/leveldb_proto/leveldb_database.h" #include "components/leveldb_proto/proto_database.h" namespace leveldb_proto { -typedef std::vector<std::pair<std::string, std::string> > KeyValueVector; +typedef base::StringPairs KeyValueVector; typedef std::vector<std::string> KeyVector; // When the ProtoDatabaseImpl instance is deleted, in-progress asynchronous diff --git a/components/policy/core/common/cloud/device_management_service.h b/components/policy/core/common/cloud/device_management_service.h index ff75659..4609221 100644 --- a/components/policy/core/common/cloud/device_management_service.h +++ b/components/policy/core/common/cloud/device_management_service.h @@ -15,11 +15,13 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "base/strings/string_split.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "components/policy/policy_export.h" #include "net/url_request/url_fetcher_delegate.h" #include "policy/proto/device_management_backend.pb.h" + namespace net { class URLRequestContextGetter; } @@ -73,7 +75,7 @@ class POLICY_EXPORT DeviceManagementRequestJob { void Start(const Callback& callback); protected: - typedef std::vector<std::pair<std::string, std::string> > ParameterMap; + typedef base::StringPairs ParameterMap; DeviceManagementRequestJob(JobType type, const std::string& agent_parameter, diff --git a/components/policy/core/common/cloud/device_management_service_unittest.cc b/components/policy/core/common/cloud/device_management_service_unittest.cc index 28b740a..85a80d8 100644 --- a/components/policy/core/common/cloud/device_management_service_unittest.cc +++ b/components/policy/core/common/cloud/device_management_service_unittest.cc @@ -359,7 +359,7 @@ class QueryParams { } private: - typedef std::vector<std::pair<std::string, std::string> > ParamMap; + typedef base::StringPairs ParamMap; ParamMap params_; }; diff --git a/components/search/search.h b/components/search/search.h index 6cc7927..9558ee8 100644 --- a/components/search/search.h +++ b/components/search/search.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/strings/string16.h" +#include "base/strings/string_split.h" namespace chrome { @@ -23,7 +24,7 @@ bool IsInstantExtendedAPIEnabled(); uint64 EmbeddedSearchPageVersion(); // Type for a collection of experiment configuration parameters. -typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; +typedef base::StringPairs FieldTrialFlags; // Finds the active field trial group name and parses out the configuration // flags. On success, |flags| will be filled with the field trial flags. |flags| |