OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/character_encoding.h" | 10 #include "chrome/browser/character_encoding.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 398 |
399 BrowserThread::PostTask( | 399 BrowserThread::PostTask( |
400 BrowserThread::UI, FROM_HERE, | 400 BrowserThread::UI, FROM_HERE, |
401 NewRunnableFunction( | 401 NewRunnableFunction( |
402 &TabSpecificContentSettings::CookieChanged, | 402 &TabSpecificContentSettings::CookieChanged, |
403 render_process_id, render_view_id, url, cookie_line, *options, | 403 render_process_id, render_view_id, url, cookie_line, *options, |
404 !allow)); | 404 !allow)); |
405 return allow; | 405 return allow; |
406 } | 406 } |
407 | 407 |
| 408 bool ChromeContentBrowserClient::AllowSaveLocalState( |
| 409 const content::ResourceContext& context) { |
| 410 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 411 ProfileIOData* io_data = |
| 412 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); |
| 413 return !io_data->clear_local_state_on_exit()->GetValue(); |
| 414 } |
| 415 |
408 QuotaPermissionContext* | 416 QuotaPermissionContext* |
409 ChromeContentBrowserClient::CreateQuotaPermissionContext() { | 417 ChromeContentBrowserClient::CreateQuotaPermissionContext() { |
410 return new ChromeQuotaPermissionContext(); | 418 return new ChromeQuotaPermissionContext(); |
411 } | 419 } |
412 | 420 |
413 void ChromeContentBrowserClient::RevealFolderInOS(const FilePath& path) { | 421 void ChromeContentBrowserClient::RevealFolderInOS(const FilePath& path) { |
414 // On Mac, this call needs to be done on the UI thread. On other platforms, | 422 // On Mac, this call needs to be done on the UI thread. On other platforms, |
415 // do it on the FILE thread so we don't slow down UI. | 423 // do it on the FILE thread so we don't slow down UI. |
416 #if defined(OS_MACOSX) | 424 #if defined(OS_MACOSX) |
417 platform_util::OpenItem(path); | 425 platform_util::OpenItem(path); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 #if defined(USE_NSS) | 606 #if defined(USE_NSS) |
599 crypto::CryptoModuleBlockingPasswordDelegate* | 607 crypto::CryptoModuleBlockingPasswordDelegate* |
600 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 608 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
601 const GURL& url) { | 609 const GURL& url) { |
602 return browser::NewCryptoModuleBlockingDialogDelegate( | 610 return browser::NewCryptoModuleBlockingDialogDelegate( |
603 browser::kCryptoModulePasswordKeygen, url.host()); | 611 browser::kCryptoModulePasswordKeygen, url.host()); |
604 } | 612 } |
605 #endif | 613 #endif |
606 | 614 |
607 } // namespace chrome | 615 } // namespace chrome |
OLD | NEW |