diff options
author | avi <avi@chromium.org> | 2015-12-25 15:27:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-25 23:28:47 +0000 |
commit | f57136c13874f21a4c6885e49d00d3c45bb427ba (patch) | |
tree | d009df408c8384390d7f10dc961742e2c24ead8b /components/search | |
parent | bc5337b805a6249554ca15d8bae77713ace7eff4 (diff) | |
download | chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.zip chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.tar.gz chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.tar.bz2 |
Switch to standard integer types in components/, part 3 of 4.
BUG=138542
TBR=blundell@chromium.org
Review URL: https://codereview.chromium.org/1551433002
Cr-Commit-Position: refs/heads/master@{#366874}
Diffstat (limited to 'components/search')
-rw-r--r-- | components/search/search.cc | 23 | ||||
-rw-r--r-- | components/search/search.h | 13 | ||||
-rw-r--r-- | components/search/search_switches.cc | 1 | ||||
-rw-r--r-- | components/search/search_unittest.cc | 1 |
4 files changed, 22 insertions, 16 deletions
diff --git a/components/search/search.cc b/components/search/search.cc index 1d0d6ada..807e476 100644 --- a/components/search/search.cc +++ b/components/search/search.cc @@ -4,12 +4,15 @@ #include "components/search/search.h" +#include <stddef.h> + #include "base/command_line.h" #include "base/metrics/field_trial.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/google/core/browser/google_util.h" #include "components/search/search_switches.h" #include "components/search_engines/template_url.h" @@ -29,13 +32,13 @@ namespace { const char kEmbeddedPageVersionFlagName[] = "espv"; #if defined(OS_IOS) -const uint64 kEmbeddedPageVersionDefault = 1; +const uint64_t kEmbeddedPageVersionDefault = 1; #elif defined(OS_ANDROID) -const uint64 kEmbeddedPageVersionDefault = 1; +const uint64_t kEmbeddedPageVersionDefault = 1; // Use this variant to enable EmbeddedSearch SearchBox API in the results page. -const uint64 kEmbeddedSearchEnabledVersion = 2; +const uint64_t kEmbeddedSearchEnabledVersion = 2; #else -const uint64 kEmbeddedPageVersionDefault = 2; +const uint64_t kEmbeddedPageVersionDefault = 2; #endif // Constants for the field trial name and group prefix. @@ -83,7 +86,7 @@ bool IsInstantExtendedAPIEnabled() { // Determine what embedded search page version to request from the user's // default search provider. If 0, the embedded search UI should not be enabled. -uint64 EmbeddedSearchPageVersion() { +uint64_t EmbeddedSearchPageVersion() { #if defined(OS_ANDROID) if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableEmbeddedSearchAPI)) { @@ -143,12 +146,12 @@ std::string GetStringValueForFlagWithDefault(const std::string& flag, return default_value; } -// Given a FieldTrialFlags object, returns the uint64 value of the provided +// Given a FieldTrialFlags object, returns the uint64_t value of the provided // flag. -uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, - uint64 default_value, - const FieldTrialFlags& flags) { - uint64 value; +uint64_t GetUInt64ValueForFlagWithDefault(const std::string& flag, + uint64_t default_value, + const FieldTrialFlags& flags) { + uint64_t value; std::string str_value = GetStringValueForFlagWithDefault(flag, std::string(), flags); if (base::StringToUint64(str_value, &value)) diff --git a/components/search/search.h b/components/search/search.h index 2ce6204..3907f85 100644 --- a/components/search/search.h +++ b/components/search/search.h @@ -5,11 +5,12 @@ #ifndef COMPONENTS_SEARCH_SEARCH_H_ #define COMPONENTS_SEARCH_SEARCH_H_ +#include <stdint.h> + #include <string> #include <utility> #include <vector> -#include "base/basictypes.h" #include "base/strings/string16.h" #include "base/strings/string_split.h" @@ -28,7 +29,7 @@ bool IsInstantExtendedAPIEnabled(); // Returns the value to pass to the &espv CGI parameter when loading the // embedded search page from the user's default search provider. Returns 0 if // the Instant Extended API is not enabled. -uint64 EmbeddedSearchPageVersion(); +uint64_t EmbeddedSearchPageVersion(); // Type for a collection of experiment configuration parameters. typedef base::StringPairs FieldTrialFlags; @@ -49,12 +50,12 @@ std::string GetStringValueForFlagWithDefault(const std::string& flag, const std::string& default_value, const FieldTrialFlags& flags); -// Given a FieldTrialFlags object, returns the uint64 value of the provided +// Given a FieldTrialFlags object, returns the uint64_t value of the provided // flag. // Exposed for testing only. -uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, - uint64 default_value, - const FieldTrialFlags& flags); +uint64_t GetUInt64ValueForFlagWithDefault(const std::string& flag, + uint64_t default_value, + const FieldTrialFlags& flags); // Given a FieldTrialFlags object, returns the bool value of the provided flag. // Exposed for testing only. diff --git a/components/search/search_switches.cc b/components/search/search_switches.cc index d3b80da..6d4b47d 100644 --- a/components/search/search_switches.cc +++ b/components/search/search_switches.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" #include "components/search/search_switches.h" namespace switches { diff --git a/components/search/search_unittest.cc b/components/search/search_unittest.cc index 4a5db38..76b8bce 100644 --- a/components/search/search_unittest.cc +++ b/components/search/search_unittest.cc @@ -6,6 +6,7 @@ #include "base/metrics/field_trial.h" #include "base/metrics/statistics_recorder.h" +#include "build/build_config.h" #include "components/variations/entropy_provider.h" #include "testing/gtest/include/gtest/gtest.h" |