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

Unified Diff: components/omnibox/browser/url_index_private_data.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/omnibox/browser/url_index_private_data.h ('k') | components/omnibox/browser/url_prefix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/url_index_private_data.cc
diff --git a/components/omnibox/browser/url_index_private_data.cc b/components/omnibox/browser/url_index_private_data.cc
index 77ddb9f2dfa3814b41e745d048ed88739137d616..0409ea6d229886e74538e694a85f89c16aa72325 100644
--- a/components/omnibox/browser/url_index_private_data.cc
+++ b/components/omnibox/browser/url_index_private_data.cc
@@ -4,6 +4,8 @@
#include "components/omnibox/browser/url_index_private_data.h"
+#include <stdint.h>
+
#include <functional>
#include <iterator>
#include <limits>
@@ -11,10 +13,10 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/files/file_util.h"
#include "base/i18n/break_iterator.h"
#include "base/i18n/case_conversion.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -1077,8 +1079,8 @@ bool URLIndexPrivateData::RestoreWordList(
if (!cache.has_word_list())
return false;
const WordListItem& list_item(cache.word_list());
- uint32 expected_item_count = list_item.word_count();
- uint32 actual_item_count = list_item.word_size();
+ uint32_t expected_item_count = list_item.word_count();
+ uint32_t actual_item_count = list_item.word_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<std::string>& words(list_item.word());
@@ -1093,8 +1095,8 @@ bool URLIndexPrivateData::RestoreWordMap(
if (!cache.has_word_map())
return false;
const WordMapItem& list_item(cache.word_map());
- uint32 expected_item_count = list_item.item_count();
- uint32 actual_item_count = list_item.word_map_entry_size();
+ uint32_t expected_item_count = list_item.item_count();
+ uint32_t actual_item_count = list_item.word_map_entry_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<WordMapEntry>& entries(list_item.word_map_entry());
@@ -1109,8 +1111,8 @@ bool URLIndexPrivateData::RestoreCharWordMap(
if (!cache.has_char_word_map())
return false;
const CharWordMapItem& list_item(cache.char_word_map());
- uint32 expected_item_count = list_item.item_count();
- uint32 actual_item_count = list_item.char_word_map_entry_size();
+ uint32_t expected_item_count = list_item.item_count();
+ uint32_t actual_item_count = list_item.char_word_map_entry_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<CharWordMapEntry>&
@@ -1123,8 +1125,8 @@ bool URLIndexPrivateData::RestoreCharWordMap(
return false;
base::char16 uni_char = static_cast<base::char16>(iter->char_16());
WordIDSet word_id_set;
- const RepeatedField<int32>& word_ids(iter->word_id());
- for (RepeatedField<int32>::const_iterator jiter = word_ids.begin();
+ const RepeatedField<int32_t>& word_ids(iter->word_id());
+ for (RepeatedField<int32_t>::const_iterator jiter = word_ids.begin();
jiter != word_ids.end(); ++jiter)
word_id_set.insert(*jiter);
char_word_map_[uni_char] = word_id_set;
@@ -1137,8 +1139,8 @@ bool URLIndexPrivateData::RestoreWordIDHistoryMap(
if (!cache.has_word_id_history_map())
return false;
const WordIDHistoryMapItem& list_item(cache.word_id_history_map());
- uint32 expected_item_count = list_item.item_count();
- uint32 actual_item_count = list_item.word_id_history_map_entry_size();
+ uint32_t expected_item_count = list_item.item_count();
+ uint32_t actual_item_count = list_item.word_id_history_map_entry_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<WordIDHistoryMapEntry>&
@@ -1151,8 +1153,8 @@ bool URLIndexPrivateData::RestoreWordIDHistoryMap(
return false;
WordID word_id = iter->word_id();
HistoryIDSet history_id_set;
- const RepeatedField<int64>& history_ids(iter->history_id());
- for (RepeatedField<int64>::const_iterator jiter = history_ids.begin();
+ const RepeatedField<int64_t>& history_ids(iter->history_id());
+ for (RepeatedField<int64_t>::const_iterator jiter = history_ids.begin();
jiter != history_ids.end(); ++jiter) {
history_id_set.insert(*jiter);
AddToHistoryIDWordMap(*jiter, word_id);
@@ -1167,8 +1169,8 @@ bool URLIndexPrivateData::RestoreHistoryInfoMap(
if (!cache.has_history_info_map())
return false;
const HistoryInfoMapItem& list_item(cache.history_info_map());
- uint32 expected_item_count = list_item.item_count();
- uint32 actual_item_count = list_item.history_info_map_entry_size();
+ uint32_t expected_item_count = list_item.item_count();
+ uint32_t actual_item_count = list_item.history_info_map_entry_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<HistoryInfoMapEntry>&
@@ -1208,8 +1210,8 @@ bool URLIndexPrivateData::RestoreWordStartsMap(
// page titles.
if (cache.has_word_starts_map()) {
const WordStartsMapItem& list_item(cache.word_starts_map());
- uint32 expected_item_count = list_item.item_count();
- uint32 actual_item_count = list_item.word_starts_map_entry_size();
+ uint32_t expected_item_count = list_item.item_count();
+ uint32_t actual_item_count = list_item.word_starts_map_entry_size();
if (actual_item_count == 0 || actual_item_count != expected_item_count)
return false;
const RepeatedPtrField<WordStartsMapEntry>&
@@ -1219,13 +1221,13 @@ bool URLIndexPrivateData::RestoreWordStartsMap(
HistoryID history_id = iter->history_id();
RowWordStarts word_starts;
// Restore the URL word starts.
- const RepeatedField<int32>& url_starts(iter->url_word_starts());
- for (RepeatedField<int32>::const_iterator jiter = url_starts.begin();
+ const RepeatedField<int32_t>& url_starts(iter->url_word_starts());
+ for (RepeatedField<int32_t>::const_iterator jiter = url_starts.begin();
jiter != url_starts.end(); ++jiter)
word_starts.url_word_starts_.push_back(*jiter);
// Restore the page title word starts.
- const RepeatedField<int32>& title_starts(iter->title_word_starts());
- for (RepeatedField<int32>::const_iterator jiter = title_starts.begin();
+ const RepeatedField<int32_t>& title_starts(iter->title_word_starts());
+ for (RepeatedField<int32_t>::const_iterator jiter = title_starts.begin();
jiter != title_starts.end(); ++jiter)
word_starts.title_word_starts_.push_back(*jiter);
word_starts_map_[history_id] = word_starts;
« no previous file with comments | « components/omnibox/browser/url_index_private_data.h ('k') | components/omnibox/browser/url_prefix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698