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

Side by Side Diff: chrome/browser/ui/webui/offline_internals_ui.cc

Issue 2191183002: [Offline Pages] Add expiration in internal log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 years, 4 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
« no previous file with comments | « no previous file | components/offline_pages/offline_page_model_event_logger.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/offline_internals_ui.h" 5 #include "chrome/browser/ui/webui/offline_internals_ui.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 } 257 }
258 258
259 void OfflineInternalsUIMessageHandler::HandleGetStoredPages( 259 void OfflineInternalsUIMessageHandler::HandleGetStoredPages(
260 const base::ListValue* args) { 260 const base::ListValue* args) {
261 AllowJavascript(); 261 AllowJavascript();
262 std::string callback_id; 262 std::string callback_id;
263 CHECK(args->GetString(0, &callback_id)); 263 CHECK(args->GetString(0, &callback_id));
264 264
265 if (offline_page_model_) { 265 if (offline_page_model_) {
266 offline_page_model_->GetAllPages( 266 offline_page_model_->GetAllPagesWithExpired(
267 base::Bind(&OfflineInternalsUIMessageHandler::HandleStoredPagesCallback, 267 base::Bind(&OfflineInternalsUIMessageHandler::HandleStoredPagesCallback,
268 weak_ptr_factory_.GetWeakPtr(), callback_id)); 268 weak_ptr_factory_.GetWeakPtr(), callback_id));
269 } else { 269 } else {
270 base::ListValue results; 270 base::ListValue results;
271 ResolveJavascriptCallback(base::StringValue(callback_id), results); 271 ResolveJavascriptCallback(base::StringValue(callback_id), results);
272 } 272 }
273 } 273 }
274 274
275 void OfflineInternalsUIMessageHandler::HandleSetRecordPageModel( 275 void OfflineInternalsUIMessageHandler::HandleSetRecordPageModel(
276 const base::ListValue* args) { 276 const base::ListValue* args) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 html_source->AddResourcePath("offline_internals_browser_proxy.js", 416 html_source->AddResourcePath("offline_internals_browser_proxy.js",
417 IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS); 417 IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS);
418 html_source->SetDefaultResource(IDR_OFFLINE_INTERNALS_HTML); 418 html_source->SetDefaultResource(IDR_OFFLINE_INTERNALS_HTML);
419 419
420 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source); 420 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
421 421
422 web_ui->AddMessageHandler(new OfflineInternalsUIMessageHandler()); 422 web_ui->AddMessageHandler(new OfflineInternalsUIMessageHandler());
423 } 423 }
424 424
425 OfflineInternalsUI::~OfflineInternalsUI() {} 425 OfflineInternalsUI::~OfflineInternalsUI() {}
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/offline_page_model_event_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698