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

Side by Side Diff: chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.cc

Issue 2473553004: Request Picker task (Closed)
Patch Set: Rename queue_status.h to request_queue_status.h Created 4 years, 1 month 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 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/offline_internals_ui_message_handler.h " 5 #include "chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 offline_page->SetDouble("creationTime", page.creation_time.ToJsTime()); 144 offline_page->SetDouble("creationTime", page.creation_time.ToJsTime());
145 offline_page->SetDouble("lastAccessTime", page.last_access_time.ToJsTime()); 145 offline_page->SetDouble("lastAccessTime", page.last_access_time.ToJsTime());
146 offline_page->SetInteger("accessCount", page.access_count); 146 offline_page->SetInteger("accessCount", page.access_count);
147 offline_page->SetString("isExpired", page.IsExpired() ? "Yes" : "No"); 147 offline_page->SetString("isExpired", page.IsExpired() ? "Yes" : "No");
148 } 148 }
149 ResolveJavascriptCallback(base::StringValue(callback_id), results); 149 ResolveJavascriptCallback(base::StringValue(callback_id), results);
150 } 150 }
151 151
152 void OfflineInternalsUIMessageHandler::HandleRequestQueueCallback( 152 void OfflineInternalsUIMessageHandler::HandleRequestQueueCallback(
153 std::string callback_id, 153 std::string callback_id,
154 offline_pages::RequestQueue::GetRequestsResult result, 154 offline_pages::QueueResults::GetRequestsResult result,
155 std::vector<std::unique_ptr<offline_pages::SavePageRequest>> requests) { 155 std::vector<std::unique_ptr<offline_pages::SavePageRequest>> requests) {
156 base::ListValue save_page_requests; 156 base::ListValue save_page_requests;
157 if (result == offline_pages::RequestQueue::GetRequestsResult::SUCCESS) { 157 if (result == offline_pages::QueueResults::GetRequestsResult::SUCCESS) {
Evan Stade 2016/11/08 23:13:36 doesn't seem this was updated?
Pete Williamson 2016/11/09 00:24:48 Ah, I did my grep in the directory where most of t
158 for (const auto& request : requests) { 158 for (const auto& request : requests) {
159 base::DictionaryValue* save_page_request = new base::DictionaryValue(); 159 base::DictionaryValue* save_page_request = new base::DictionaryValue();
160 save_page_requests.Append(save_page_request); 160 save_page_requests.Append(save_page_request);
161 save_page_request->SetString("onlineUrl", request->url().spec()); 161 save_page_request->SetString("onlineUrl", request->url().spec());
162 save_page_request->SetDouble("creationTime", 162 save_page_request->SetDouble("creationTime",
163 request->creation_time().ToJsTime()); 163 request->creation_time().ToJsTime());
164 save_page_request->SetString("status", GetStringFromSavePageStatus()); 164 save_page_request->SetString("status", GetStringFromSavePageStatus());
165 save_page_request->SetString("namespace", 165 save_page_request->SetString("namespace",
166 request->client_id().name_space); 166 request->client_id().name_space);
167 save_page_request->SetDouble("lastAttempt", 167 save_page_request->SetDouble("lastAttempt",
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 // Get the offline page model associated with this web ui. 340 // Get the offline page model associated with this web ui.
341 Profile* profile = Profile::FromWebUI(web_ui()); 341 Profile* profile = Profile::FromWebUI(web_ui());
342 offline_page_model_ = 342 offline_page_model_ =
343 offline_pages::OfflinePageModelFactory::GetForBrowserContext(profile); 343 offline_pages::OfflinePageModelFactory::GetForBrowserContext(profile);
344 request_coordinator_ = 344 request_coordinator_ =
345 offline_pages::RequestCoordinatorFactory::GetForBrowserContext(profile); 345 offline_pages::RequestCoordinatorFactory::GetForBrowserContext(profile);
346 } 346 }
347 347
348 } // namespace offline_internals 348 } // namespace offline_internals
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h ('k') | components/offline_pages/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698