Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_utils.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/offline_pages/offline_page_utils.h" 5 #include "chrome/browser/android/offline_pages/offline_page_utils.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" 9 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h"
10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const GURL& offline_url) { 88 const GURL& offline_url) {
89 const offline_pages::OfflinePageItem* offline_page = 89 const offline_pages::OfflinePageItem* offline_page =
90 GetOfflinePageForOfflineURL(browser_context, offline_url); 90 GetOfflinePageForOfflineURL(browser_context, offline_url);
91 if (!offline_page) 91 if (!offline_page)
92 return GURL(); 92 return GURL();
93 93
94 return offline_page->url; 94 return offline_page->url;
95 } 95 }
96 96
97 // static 97 // static
98 int64 OfflinePageUtils::GetBookmarkIdForOfflineURL( 98 int64_t OfflinePageUtils::GetBookmarkIdForOfflineURL(
99 content::BrowserContext* browser_context, 99 content::BrowserContext* browser_context,
100 const GURL& offline_url) { 100 const GURL& offline_url) {
101 const offline_pages::OfflinePageItem* offline_page = 101 const offline_pages::OfflinePageItem* offline_page =
102 GetOfflinePageForOfflineURL(browser_context, offline_url); 102 GetOfflinePageForOfflineURL(browser_context, offline_url);
103 if (!offline_page) 103 if (!offline_page)
104 return -1; 104 return -1;
105 105
106 return offline_page->bookmark_id; 106 return offline_page->bookmark_id;
107 } 107 }
108 108
(...skipping 20 matching lines...) Expand all
129 if (!offline_pages::IsOfflinePagesEnabled()) 129 if (!offline_pages::IsOfflinePagesEnabled())
130 return false; 130 return false;
131 131
132 offline_pages::OfflinePageModel* offline_page_model = 132 offline_pages::OfflinePageModel* offline_page_model =
133 offline_pages::OfflinePageModelFactory::GetForBrowserContext( 133 offline_pages::OfflinePageModelFactory::GetForBrowserContext(
134 browser_context); 134 browser_context);
135 return offline_page_model->HasOfflinePages(); 135 return offline_page_model->HasOfflinePages();
136 } 136 }
137 137
138 } // namespace offline_pages 138 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698