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

Unified Diff: components/search/search.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 | « components/search/search.h ('k') | components/search/search_switches.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search/search.cc
diff --git a/components/search/search.cc b/components/search/search.cc
index 1d0d6ada2bb8df297fae133e31fe6aaf09b580b8..807e4765c1733ed23cb01d22cde32a91b8f4367d 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))
« no previous file with comments | « components/search/search.h ('k') | components/search/search_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698