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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 2578723002: Reduce BrowsingDataRemover's dependencies on Chrome (Closed)
Patch Set: A new callsite appeared through rebase - fixed the compilation error. Created 3 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 (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
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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 //////////////////////////////////////////////////////////////////////////////// 1169 ////////////////////////////////////////////////////////////////////////////////
1170 1170
1171 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1171 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1172 : WebUIController(web_ui) { 1172 : WebUIController(web_ui) {
1173 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1173 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1174 1174
1175 // Set up the chrome://net-internals/ source. 1175 // Set up the chrome://net-internals/ source.
1176 Profile* profile = Profile::FromWebUI(web_ui); 1176 Profile* profile = Profile::FromWebUI(web_ui);
1177 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1177 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1178 } 1178 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/webui/options/clear_browser_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698