diff options
author | brettw <brettw@chromium.org> | 2015-06-02 21:29:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-03 04:30:27 +0000 |
commit | bd4d71128239a38fa844c42e4110458109a8b135 (patch) | |
tree | 47ff0ad11b9270fb410d93632fd63a0c78218176 /android_webview/native | |
parent | 6f89d8f965bae07a352ee82abe1fb551f65d65e1 (diff) | |
download | chromium_src-bd4d71128239a38fa844c42e4110458109a8b135.zip chromium_src-bd4d71128239a38fa844c42e4110458109a8b135.tar.gz chromium_src-bd4d71128239a38fa844c42e4110458109a8b135.tar.bz2 |
Change most uses of Pickle to base::Pickle
There should be no behavior change.
TBR=jschuh (IPC messages)
Review URL: https://codereview.chromium.org/1154283003
Cr-Commit-Position: refs/heads/master@{#332552}
Diffstat (limited to 'android_webview/native')
-rw-r--r-- | android_webview/native/aw_contents.cc | 8 | ||||
-rw-r--r-- | android_webview/native/state_serializer.cc | 12 | ||||
-rw-r--r-- | android_webview/native/state_serializer_unittest.cc | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc index c7af67f..30c243e 100644 --- a/android_webview/native/aw_contents.cc +++ b/android_webview/native/aw_contents.cc @@ -846,7 +846,7 @@ AwContents::GetOpaqueState(JNIEnv* env, jobject obj) { if (!web_contents_->GetController().GetEntryCount()) return ScopedJavaLocalRef<jbyteArray>(); - Pickle pickle; + base::Pickle pickle; if (!WriteToPickle(*web_contents_, &pickle)) { return ScopedJavaLocalRef<jbyteArray>(); } else { @@ -863,9 +863,9 @@ jboolean AwContents::RestoreFromOpaqueState( std::vector<uint8> state_vector; base::android::JavaByteArrayToByteVector(env, state, &state_vector); - Pickle pickle(reinterpret_cast<const char*>(state_vector.data()), - state_vector.size()); - PickleIterator iterator(pickle); + base::Pickle pickle(reinterpret_cast<const char*>(state_vector.data()), + state_vector.size()); + base::PickleIterator iterator(pickle); return RestoreFromPickle(&iterator, web_contents_.get()); } diff --git a/android_webview/native/state_serializer.cc b/android_webview/native/state_serializer.cc index b969883..50dfd34 100644 --- a/android_webview/native/state_serializer.cc +++ b/android_webview/native/state_serializer.cc @@ -40,7 +40,7 @@ const uint32 AW_STATE_VERSION = 20130814; } // namespace bool WriteToPickle(const content::WebContents& web_contents, - Pickle* pickle) { + base::Pickle* pickle) { DCHECK(pickle); if (!internal::WriteHeaderToPickle(pickle)) @@ -71,7 +71,7 @@ bool WriteToPickle(const content::WebContents& web_contents, return true; } -bool RestoreFromPickle(PickleIterator* iterator, +bool RestoreFromPickle(base::PickleIterator* iterator, content::WebContents* web_contents) { DCHECK(iterator); DCHECK(web_contents); @@ -136,11 +136,11 @@ bool RestoreFromPickle(PickleIterator* iterator, namespace internal { -bool WriteHeaderToPickle(Pickle* pickle) { +bool WriteHeaderToPickle(base::Pickle* pickle) { return pickle->WriteUInt32(AW_STATE_VERSION); } -bool RestoreHeaderFromPickle(PickleIterator* iterator) { +bool RestoreHeaderFromPickle(base::PickleIterator* iterator) { uint32 state_version = -1; if (!iterator->ReadUInt32(&state_version)) return false; @@ -152,7 +152,7 @@ bool RestoreHeaderFromPickle(PickleIterator* iterator) { } bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry, - Pickle* pickle) { + base::Pickle* pickle) { if (!pickle->WriteString(entry.GetURL().spec())) return false; @@ -194,7 +194,7 @@ bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry, return true; } -bool RestoreNavigationEntryFromPickle(PickleIterator* iterator, +bool RestoreNavigationEntryFromPickle(base::PickleIterator* iterator, content::NavigationEntry* entry) { { string url; diff --git a/android_webview/native/state_serializer_unittest.cc b/android_webview/native/state_serializer_unittest.cc index 27b7e51..fd897d4 100644 --- a/android_webview/native/state_serializer_unittest.cc +++ b/android_webview/native/state_serializer_unittest.cc @@ -22,11 +22,11 @@ using std::string; namespace android_webview { TEST(AndroidWebViewStateSerializerTest, TestHeaderSerialization) { - Pickle pickle; + base::Pickle pickle; bool result = internal::WriteHeaderToPickle(&pickle); EXPECT_TRUE(result); - PickleIterator iterator(pickle); + base::PickleIterator iterator(pickle); result = internal::RestoreHeaderFromPickle(&iterator); EXPECT_TRUE(result); } @@ -68,12 +68,12 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) { entry->SetTimestamp(timestamp); entry->SetHttpStatusCode(http_status_code); - Pickle pickle; + base::Pickle pickle; bool result = internal::WriteNavigationEntryToPickle(*entry, &pickle); EXPECT_TRUE(result); scoped_ptr<content::NavigationEntry> copy(content::NavigationEntry::Create()); - PickleIterator iterator(pickle); + base::PickleIterator iterator(pickle); result = internal::RestoreNavigationEntryFromPickle(&iterator, copy.get()); EXPECT_TRUE(result); |