diff options
author | pkasting <pkasting@chromium.org> | 2014-10-08 11:48:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-08 18:49:53 +0000 |
commit | d456651fa15d036ab2a1f45a88c045c9d8f0dcb6 (patch) | |
tree | 23135b6efbb85a4c064a0e05c2e4ab36ecc9749a /extensions/common/user_script.cc | |
parent | 364eef210d451f680da6ad59f64d8b06eb57e432 (diff) | |
download | chromium_src-d456651fa15d036ab2a1f45a88c045c9d8f0dcb6.zip chromium_src-d456651fa15d036ab2a1f45a88c045c9d8f0dcb6.tar.gz chromium_src-d456651fa15d036ab2a1f45a88c045c9d8f0dcb6.tar.bz2 |
Use ReadSizeT()/WriteSizeT() in more places.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/631953003
Cr-Commit-Position: refs/heads/master@{#298752}
Diffstat (limited to 'extensions/common/user_script.cc')
-rw-r--r-- | extensions/common/user_script.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/extensions/common/user_script.cc b/extensions/common/user_script.cc index 193a113..a56cadb 100644 --- a/extensions/common/user_script.cc +++ b/extensions/common/user_script.cc @@ -155,7 +155,7 @@ void UserScript::Pickle(::Pickle* pickle) const { void UserScript::PickleGlobs(::Pickle* pickle, const std::vector<std::string>& globs) const { - pickle->WriteUInt64(globs.size()); + pickle->WriteSizeT(globs.size()); for (std::vector<std::string>::const_iterator glob = globs.begin(); glob != globs.end(); ++glob) { pickle->WriteString(*glob); @@ -164,7 +164,7 @@ void UserScript::PickleGlobs(::Pickle* pickle, void UserScript::PickleURLPatternSet(::Pickle* pickle, const URLPatternSet& pattern_list) const { - pickle->WriteUInt64(pattern_list.patterns().size()); + pickle->WriteSizeT(pattern_list.patterns().size()); for (URLPatternSet::const_iterator pattern = pattern_list.begin(); pattern != pattern_list.end(); ++pattern) { pickle->WriteInt(pattern->valid_schemes()); @@ -174,7 +174,7 @@ void UserScript::PickleURLPatternSet(::Pickle* pickle, void UserScript::PickleScripts(::Pickle* pickle, const FileList& scripts) const { - pickle->WriteUInt64(scripts.size()); + pickle->WriteSizeT(scripts.size()); for (FileList::const_iterator file = scripts.begin(); file != scripts.end(); ++file) { file->Pickle(pickle); @@ -205,10 +205,10 @@ void UserScript::Unpickle(const ::Pickle& pickle, PickleIterator* iter) { void UserScript::UnpickleGlobs(const ::Pickle& pickle, PickleIterator* iter, std::vector<std::string>* globs) { - uint64 num_globs = 0; - CHECK(pickle.ReadUInt64(iter, &num_globs)); + size_t num_globs = 0; + CHECK(pickle.ReadSizeT(iter, &num_globs)); globs->clear(); - for (uint64 i = 0; i < num_globs; ++i) { + for (size_t i = 0; i < num_globs; ++i) { std::string glob; CHECK(pickle.ReadString(iter, &glob)); globs->push_back(glob); @@ -218,11 +218,11 @@ void UserScript::UnpickleGlobs(const ::Pickle& pickle, PickleIterator* iter, void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle, PickleIterator* iter, URLPatternSet* pattern_list) { - uint64 num_patterns = 0; - CHECK(pickle.ReadUInt64(iter, &num_patterns)); + size_t num_patterns = 0; + CHECK(pickle.ReadSizeT(iter, &num_patterns)); pattern_list->ClearPatterns(); - for (uint64 i = 0; i < num_patterns; ++i) { + for (size_t i = 0; i < num_patterns; ++i) { int valid_schemes; CHECK(pickle.ReadInt(iter, &valid_schemes)); @@ -241,10 +241,10 @@ void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle, void UserScript::UnpickleScripts(const ::Pickle& pickle, PickleIterator* iter, FileList* scripts) { - uint64 num_files = 0; - CHECK(pickle.ReadUInt64(iter, &num_files)); + size_t num_files = 0; + CHECK(pickle.ReadSizeT(iter, &num_files)); scripts->clear(); - for (uint64 i = 0; i < num_files; ++i) { + for (size_t i = 0; i < num_files; ++i) { File file; file.Unpickle(pickle, iter); scripts->push_back(file); |