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

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

Issue 1551753002: Build third-party code with -Wall, build chromium_code with -Wextra on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig Created 4 years, 11 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // static 115 // static
116 bool OfflinePageUtils::HasOfflinePageForOnlineURL( 116 bool OfflinePageUtils::HasOfflinePageForOnlineURL(
117 content::BrowserContext* browser_context, 117 content::BrowserContext* browser_context,
118 const GURL& online_url) { 118 const GURL& online_url) {
119 const offline_pages::OfflinePageItem* offline_page = 119 const offline_pages::OfflinePageItem* offline_page =
120 GetOfflinePageForOnlineURL(browser_context, online_url); 120 GetOfflinePageForOnlineURL(browser_context, online_url);
121 return offline_page && !offline_page->file_path.empty(); 121 return offline_page && !offline_page->file_path.empty();
122 } 122 }
123 123
124 // static 124 // static
125 const bool OfflinePageUtils::HasOfflinePages( 125 bool OfflinePageUtils::HasOfflinePages(
126 content::BrowserContext* browser_context) { 126 content::BrowserContext* browser_context) {
127 DCHECK(browser_context); 127 DCHECK(browser_context);
128 128
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