Chromium Code Reviews| 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..5dbcacef77638ce9250f4caf10c61db49956f344 100644 |
| --- a/chrome/browser/android/offline_pages/offline_page_utils.cc |
| +++ b/chrome/browser/android/offline_pages/offline_page_utils.cc |
| @@ -4,6 +4,9 @@ |
| #include "chrome/browser/android/offline_pages/offline_page_utils.h" |
| +#include <cstdlib> |
|
dewittj
2016/02/26 18:42:56
I don't think you use this anymore.
bburns
2016/02/27 00:48:19
Done.
|
| + |
| +#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 +106,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 |