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

Side by Side 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: Rename parameter Created 6 years, 8 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 | Annotate | Revision Log
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/browsing_data/browsing_data_helper.h" 24 #include "chrome/browser/browsing_data/browsing_data_helper.h"
25 #include "chrome/browser/browsing_data/browsing_data_remover.h" 25 #include "chrome/browser/browsing_data/browsing_data_remover.h"
26 #include "chrome/browser/character_encoding.h" 26 #include "chrome/browser/character_encoding.h"
27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 27 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
28 #include "chrome/browser/chrome_quota_permission_context.h" 28 #include "chrome/browser/chrome_quota_permission_context.h"
29 #include "chrome/browser/content_settings/content_settings_utils.h" 29 #include "chrome/browser/content_settings/content_settings_utils.h"
30 #include "chrome/browser/content_settings/cookie_settings.h" 30 #include "chrome/browser/content_settings/cookie_settings.h"
31 #include "chrome/browser/content_settings/host_content_settings_map.h" 31 #include "chrome/browser/content_settings/host_content_settings_map.h"
32 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 32 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
33 #include "chrome/browser/defaults.h" 33 #include "chrome/browser/defaults.h"
34 #include "chrome/browser/devtools/devtools_network_controller.h"
34 #include "chrome/browser/download/download_prefs.h" 35 #include "chrome/browser/download/download_prefs.h"
35 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 36 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
36 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h" 37 #include "chrome/browser/extensions/browser_permissions_policy_delegate.h"
37 #include "chrome/browser/extensions/extension_service.h" 38 #include "chrome/browser/extensions/extension_service.h"
38 #include "chrome/browser/extensions/extension_util.h" 39 #include "chrome/browser/extensions/extension_util.h"
39 #include "chrome/browser/extensions/extension_web_ui.h" 40 #include "chrome/browser/extensions/extension_web_ui.h"
40 #include "chrome/browser/extensions/extension_webkit_preferences.h" 41 #include "chrome/browser/extensions/extension_webkit_preferences.h"
41 #include "chrome/browser/extensions/suggest_permission_util.h" 42 #include "chrome/browser/extensions/suggest_permission_util.h"
42 #include "chrome/browser/geolocation/chrome_access_token_store.h" 43 #include "chrome/browser/geolocation/chrome_access_token_store.h"
43 #include "chrome/browser/google/google_util.h" 44 #include "chrome/browser/google/google_util.h"
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { 2379 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) {
2379 Profile* profile = Profile::FromBrowserContext( 2380 Profile* profile = Profile::FromBrowserContext(
2380 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext()); 2381 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());
2381 BrowsingDataRemover* remover = 2382 BrowsingDataRemover* remover =
2382 BrowsingDataRemover::CreateForUnboundedRange(profile); 2383 BrowsingDataRemover::CreateForUnboundedRange(profile);
2383 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; 2384 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA;
2384 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); 2385 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB);
2385 // BrowsingDataRemover takes care of deleting itself when done. 2386 // BrowsingDataRemover takes care of deleting itself when done.
2386 } 2387 }
2387 2388
2389 void ChromeContentBrowserClient::DisableNetwork(
2390 content::RenderViewHost* rvh,
2391 const std::string& client_id,
2392 bool disable_network) {
2393 Profile* profile = Profile::FromBrowserContext(
2394 rvh->GetSiteInstance()->GetProcess()->GetBrowserContext());
2395 DevToolsNetworkController::DisableNetwork(
2396 profile, client_id, disable_network);
2397 }
2398
2388 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { 2399 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
2389 return DownloadPrefs::GetDefaultDownloadDirectory(); 2400 return DownloadPrefs::GetDefaultDownloadDirectory();
2390 } 2401 }
2391 2402
2392 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { 2403 std::string ChromeContentBrowserClient::GetDefaultDownloadName() {
2393 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); 2404 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME);
2394 } 2405 }
2395 2406
2396 void ChromeContentBrowserClient::DidCreatePpapiPlugin( 2407 void ChromeContentBrowserClient::DidCreatePpapiPlugin(
2397 content::BrowserPpapiHost* browser_host) { 2408 content::BrowserPpapiHost* browser_host) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 switches::kDisableWebRtcEncryption, 2689 switches::kDisableWebRtcEncryption,
2679 }; 2690 };
2680 to_command_line->CopySwitchesFrom(from_command_line, 2691 to_command_line->CopySwitchesFrom(from_command_line,
2681 kWebRtcDevSwitchNames, 2692 kWebRtcDevSwitchNames,
2682 arraysize(kWebRtcDevSwitchNames)); 2693 arraysize(kWebRtcDevSwitchNames));
2683 } 2694 }
2684 } 2695 }
2685 #endif // defined(ENABLE_WEBRTC) 2696 #endif // defined(ENABLE_WEBRTC)
2686 2697
2687 } // namespace chrome 2698 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698