diff options
Diffstat (limited to 'chrome/browser/android/bookmarks')
7 files changed, 25 insertions, 13 deletions
diff --git a/chrome/browser/android/bookmarks/bookmarks_bridge.cc b/chrome/browser/android/bookmarks/bookmarks_bridge.cc index fdd0bd9..93bfbf0 100644 --- a/chrome/browser/android/bookmarks/bookmarks_bridge.cc +++ b/chrome/browser/android/bookmarks/bookmarks_bridge.cc @@ -4,6 +4,9 @@ #include "chrome/browser/android/bookmarks/bookmarks_bridge.h" +#include <stddef.h> +#include <stdint.h> + #include "base/android/jni_array.h" #include "base/android/jni_string.h" #include "base/containers/stack_container.h" @@ -589,7 +592,7 @@ jboolean BookmarksBridge::IsFolderVisible(JNIEnv* env, jint type) { if (type == BookmarkType::BOOKMARK_TYPE_NORMAL) { const BookmarkNode* node = bookmarks::GetBookmarkNodeByID( - bookmark_model_, static_cast<int64>(id)); + bookmark_model_, static_cast<int64_t>(id)); return node->IsVisible(); } else if (type == BookmarkType::BOOKMARK_TYPE_PARTNER) { const BookmarkNode* node = partner_bookmarks_shim_->GetNodeByID( @@ -806,7 +809,7 @@ ScopedJavaLocalRef<jobject> BookmarksBridge::CreateJavaBookmark( JNIEnv* env = AttachCurrentThread(); const BookmarkNode* parent = GetParentNode(node); - int64 parent_id = parent ? parent->id() : -1; + int64_t parent_id = parent ? parent->id() : -1; std::string url; if (node->is_url()) @@ -837,11 +840,10 @@ void BookmarksBridge::ExtractBookmarkNodeInformation(const BookmarkNode* node, const BookmarkNode* BookmarksBridge::GetNodeByID(long node_id, int type) { const BookmarkNode* node; if (type == BookmarkType::BOOKMARK_TYPE_PARTNER) { - node = partner_bookmarks_shim_->GetNodeByID( - static_cast<int64>(node_id)); + node = partner_bookmarks_shim_->GetNodeByID(static_cast<int64_t>(node_id)); } else { node = bookmarks::GetBookmarkNodeByID(bookmark_model_, - static_cast<int64>(node_id)); + static_cast<int64_t>(node_id)); } return node; } diff --git a/chrome/browser/android/bookmarks/bookmarks_bridge.h b/chrome/browser/android/bookmarks/bookmarks_bridge.h index e1c82e8..7d801b1 100644 --- a/chrome/browser/android/bookmarks/bookmarks_bridge.h +++ b/chrome/browser/android/bookmarks/bookmarks_bridge.h @@ -9,8 +9,8 @@ #include "base/android/jni_android.h" #include "base/android/jni_weak_ref.h" -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" #include "components/bookmarks/browser/base_bookmark_model_observer.h" #include "components/bookmarks/common/android/bookmark_id.h" diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc b/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc index 4417e50..1f87d03 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc +++ b/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc @@ -91,7 +91,7 @@ void PrepareAndSetFavicon(JNIEnv* env, jbyte* icon_bytes, int icon_len, } } -const BookmarkNode* GetNodeByID(const BookmarkNode* parent, int64 id) { +const BookmarkNode* GetNodeByID(const BookmarkNode* parent, int64_t id) { if (parent->id() == id) return parent; for (int i= 0, child_count = parent->child_count(); i < child_count; ++i) { diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_reader.h b/chrome/browser/android/bookmarks/partner_bookmarks_reader.h index 04b988d..a89a74b 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_reader.h +++ b/chrome/browser/android/bookmarks/partner_bookmarks_reader.h @@ -5,7 +5,10 @@ #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_READER_H_ #define CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_READER_H_ +#include <stdint.h> + #include "base/android/jni_weak_ref.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/bookmarks/browser/bookmark_model.h" @@ -45,7 +48,7 @@ class PartnerBookmarksReader { // JNI scoped_ptr<bookmarks::BookmarkNode> wip_partner_bookmarks_root_; - int64 wip_next_available_id_; + int64_t wip_next_available_id_; DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksReader); }; diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc b/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc index 39234de..c6cd7c5 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc +++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim.cc @@ -137,7 +137,7 @@ void PartnerBookmarksShim::RemoveObserver( observers_.RemoveObserver(observer); } -const BookmarkNode* PartnerBookmarksShim::GetNodeByID(int64 id) const { +const BookmarkNode* PartnerBookmarksShim::GetNodeByID(int64_t id) const { DCHECK(IsLoaded()); if (!HasPartnerBookmarks()) return NULL; @@ -225,7 +225,8 @@ PartnerBookmarksShim::~PartnerBookmarksShim() { } const BookmarkNode* PartnerBookmarksShim::GetNodeByID( - const BookmarkNode* parent, int64 id) const { + const BookmarkNode* parent, + int64_t id) const { if (parent->id() == id) return parent; for (int i = 0, child_count = parent->child_count(); i < child_count; ++i) { diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim.h b/chrome/browser/android/bookmarks/partner_bookmarks_shim.h index bc78106..b5cd93e 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_shim.h +++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim.h @@ -5,7 +5,10 @@ #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ #define CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ +#include <stdint.h> + #include "base/android/jni_weak_ref.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/supports_user_data.h" @@ -83,7 +86,7 @@ class PartnerBookmarksShim : public base::SupportsUserData::Data { void RemoveObserver(Observer* observer); // PartnerBookmarksShim versions of BookmarkModel/BookmarkNode methods - const bookmarks::BookmarkNode* GetNodeByID(int64 id) const; + const bookmarks::BookmarkNode* GetNodeByID(int64_t id) const; base::string16 GetTitle(const bookmarks::BookmarkNode* node) const; bool IsPartnerBookmark(const bookmarks::BookmarkNode* node) const; @@ -126,7 +129,7 @@ class PartnerBookmarksShim : public base::SupportsUserData::Data { const bookmarks::BookmarkNode* GetNodeByID( const bookmarks::BookmarkNode* parent, - int64 id) const; + int64_t id) const; void ReloadNodeMapping(); void SaveNodeMapping(); diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc index 0a2eab4..a5d286f 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc +++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc @@ -4,6 +4,9 @@ #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" +#include <stdint.h> + +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" @@ -126,7 +129,7 @@ TEST_F(PartnerBookmarksShimTest, ObserverNotifiedOfLoadNoPartnerBookmarks) { TEST_F(PartnerBookmarksShimTest, ObserverNotifiedOfLoadWithPartnerBookmarks) { EXPECT_CALL(observer_, PartnerShimLoaded(_)).Times(0); - int64 id = 5; + int64_t id = 5; BookmarkNode* root_partner_node = new BookmarkPermanentNode(id++); BookmarkNode* partner_bookmark1 = new BookmarkNode(id++, GURL("http://www.a.com")); |
