| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net_internals/net_internals_ui.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 517 |
| 518 void NetInternalsMessageHandler::OnRendererReady(const base::ListValue* list) { | 518 void NetInternalsMessageHandler::OnRendererReady(const base::ListValue* list) { |
| 519 IOThreadImpl::CallbackHelper(&IOThreadImpl::OnRendererReady, proxy_, list); | 519 IOThreadImpl::CallbackHelper(&IOThreadImpl::OnRendererReady, proxy_, list); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void NetInternalsMessageHandler::OnClearBrowserCache( | 522 void NetInternalsMessageHandler::OnClearBrowserCache( |
| 523 const base::ListValue* list) { | 523 const base::ListValue* list) { |
| 524 BrowsingDataRemover* remover = | 524 BrowsingDataRemover* remover = |
| 525 BrowsingDataRemoverFactory::GetForBrowserContext( | 525 BrowsingDataRemoverFactory::GetForBrowserContext( |
| 526 Profile::FromWebUI(web_ui())); | 526 Profile::FromWebUI(web_ui())); |
| 527 remover->Remove(BrowsingDataRemover::Unbounded(), | 527 remover->Remove(base::Time(), base::Time::Max(), |
| 528 BrowsingDataRemover::REMOVE_CACHE, | 528 BrowsingDataRemover::REMOVE_CACHE, |
| 529 BrowsingDataHelper::UNPROTECTED_WEB); | 529 BrowsingDataHelper::UNPROTECTED_WEB); |
| 530 // BrowsingDataRemover deletes itself. | 530 // BrowsingDataRemover deletes itself. |
| 531 } | 531 } |
| 532 | 532 |
| 533 void NetInternalsMessageHandler::OnGetPrerenderInfo( | 533 void NetInternalsMessageHandler::OnGetPrerenderInfo( |
| 534 const base::ListValue* /* list */) { | 534 const base::ListValue* /* list */) { |
| 535 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 535 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 536 | 536 |
| 537 std::unique_ptr<base::DictionaryValue> value; | 537 std::unique_ptr<base::DictionaryValue> value; |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 //////////////////////////////////////////////////////////////////////////////// | 1172 //////////////////////////////////////////////////////////////////////////////// |
| 1173 | 1173 |
| 1174 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1174 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
| 1175 : WebUIController(web_ui) { | 1175 : WebUIController(web_ui) { |
| 1176 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1176 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
| 1177 | 1177 |
| 1178 // Set up the chrome://net-internals/ source. | 1178 // Set up the chrome://net-internals/ source. |
| 1179 Profile* profile = Profile::FromWebUI(web_ui); | 1179 Profile* profile = Profile::FromWebUI(web_ui); |
| 1180 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 1180 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
| 1181 } | 1181 } |
| OLD | NEW |