| Index: chrome/browser/android/offline_pages/offline_page_utils.cc
|
| diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| index 5fdaa58dc70b62369bd81c17c06306a6516c58c2..a2595778044a5efa3df262f05d5e16dae2f5e8b4 100644
|
| --- a/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| +++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/android/offline_pages/offline_page_utils.h"
|
|
|
| +#include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_piece.h"
|
| #include "base/strings/string_util.h"
|
| #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h"
|
| @@ -103,7 +104,15 @@ int64_t OfflinePageUtils::GetBookmarkIdForOfflineURL(
|
| if (!offline_page)
|
| return -1;
|
|
|
| - return offline_page->bookmark_id;
|
| + if (offline_page->client_id.name_space != offline_pages::BOOKMARK_NAMESPACE) {
|
| + return -1;
|
| + }
|
| +
|
| + int64_t result;
|
| + if (base::StringToInt64(offline_page->client_id.id, &result)) {
|
| + return result;
|
| + }
|
| + return -1;
|
| }
|
|
|
| // static
|
|
|