| 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 | 2413 |
| 2414 // chrome: & friends. | 2414 // chrome: & friends. |
| 2415 handler->AddHandlerPair(&HandleWebUI, &HandleWebUIReverse); | 2415 handler->AddHandlerPair(&HandleWebUI, &HandleWebUIReverse); |
| 2416 } | 2416 } |
| 2417 | 2417 |
| 2418 void ChromeContentBrowserClient::ClearCache(RenderFrameHost* rfh) { | 2418 void ChromeContentBrowserClient::ClearCache(RenderFrameHost* rfh) { |
| 2419 Profile* profile = Profile::FromBrowserContext( | 2419 Profile* profile = Profile::FromBrowserContext( |
| 2420 rfh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 2420 rfh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
| 2421 BrowsingDataRemover* remover = | 2421 BrowsingDataRemover* remover = |
| 2422 BrowsingDataRemoverFactory::GetForBrowserContext(profile); | 2422 BrowsingDataRemoverFactory::GetForBrowserContext(profile); |
| 2423 remover->Remove(BrowsingDataRemover::Unbounded(), | 2423 remover->Remove(Unbounded(), BrowsingDataRemover::REMOVE_CACHE, |
| 2424 BrowsingDataRemover::REMOVE_CACHE, | |
| 2425 BrowsingDataHelper::UNPROTECTED_WEB); | 2424 BrowsingDataHelper::UNPROTECTED_WEB); |
| 2426 } | 2425 } |
| 2427 | 2426 |
| 2428 void ChromeContentBrowserClient::ClearCookies(RenderFrameHost* rfh) { | 2427 void ChromeContentBrowserClient::ClearCookies(RenderFrameHost* rfh) { |
| 2429 Profile* profile = Profile::FromBrowserContext( | 2428 Profile* profile = Profile::FromBrowserContext( |
| 2430 rfh->GetSiteInstance()->GetProcess()->GetBrowserContext()); | 2429 rfh->GetSiteInstance()->GetProcess()->GetBrowserContext()); |
| 2431 BrowsingDataRemover* remover = | 2430 BrowsingDataRemover* remover = |
| 2432 BrowsingDataRemoverFactory::GetForBrowserContext(profile); | 2431 BrowsingDataRemoverFactory::GetForBrowserContext(profile); |
| 2433 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; | 2432 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA; |
| 2434 remover->Remove(BrowsingDataRemover::Unbounded(), remove_mask, | 2433 remover->Remove(Unbounded(), remove_mask, |
| 2435 BrowsingDataHelper::UNPROTECTED_WEB); | 2434 BrowsingDataHelper::UNPROTECTED_WEB); |
| 2436 } | 2435 } |
| 2437 | 2436 |
| 2438 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 2437 base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
| 2439 return DownloadPrefs::GetDefaultDownloadDirectory(); | 2438 return DownloadPrefs::GetDefaultDownloadDirectory(); |
| 2440 } | 2439 } |
| 2441 | 2440 |
| 2442 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 2441 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
| 2443 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 2442 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
| 2444 } | 2443 } |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2957 if (channel <= kMaxDisableEncryptionChannel) { | 2956 if (channel <= kMaxDisableEncryptionChannel) { |
| 2958 static const char* const kWebRtcDevSwitchNames[] = { | 2957 static const char* const kWebRtcDevSwitchNames[] = { |
| 2959 switches::kDisableWebRtcEncryption, | 2958 switches::kDisableWebRtcEncryption, |
| 2960 }; | 2959 }; |
| 2961 to_command_line->CopySwitchesFrom(from_command_line, | 2960 to_command_line->CopySwitchesFrom(from_command_line, |
| 2962 kWebRtcDevSwitchNames, | 2961 kWebRtcDevSwitchNames, |
| 2963 arraysize(kWebRtcDevSwitchNames)); | 2962 arraysize(kWebRtcDevSwitchNames)); |
| 2964 } | 2963 } |
| 2965 } | 2964 } |
| 2966 #endif // defined(ENABLE_WEBRTC) | 2965 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |