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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split controller and factory Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 232c2c85b4e65c5436d2d5a41f9478cc29a010f4..9a0244aaa56258208844c6a5c899594881c4ba4d 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -51,6 +51,7 @@
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
#include "chrome/browser/net/chrome_net_log.h"
+#include "chrome/browser/net/network_controller.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/platform_util.h"
@@ -2427,6 +2428,15 @@ void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) {
// BrowsingDataRemover takes care of deleting itself when done.
}
+void ChromeContentBrowserClient::DisableNetwork(
+ content::RenderViewHost* rvh,
+ const std::string& id,
+ bool disable_network) {
+ Profile* profile = Profile::FromBrowserContext(
+ rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());
+ NetworkController::DisableNetwork(profile, id, disable_network);
+}
+
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
return DownloadPrefs::GetDefaultDownloadDirectory();
}

Powered by Google App Engine
This is Rietveld 408576698