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..84af014223da6537283820a4625d265721f53ba7 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> |
| + |
| +#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 != "bookmark") { |
|
fgorski
2016/02/23 17:15:30
this should be declared someplace in offline pages
bburns
2016/02/23 19:25:38
Done.
|
| + return -1; |
| + } |
| + |
| + int64_t result; |
| + if (base::StringToInt64(offline_page->client_id, &result)) { |
| + return result; |
| + } |
| + return -1; |
| } |
| // static |