| 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/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 14 #include "base/logging.h" |
| 14 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 15 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
| 16 #include "base/task.h" | 17 #include "base/task.h" |
| 17 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/content_settings/host_content_settings_map.h" | 19 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 20 #include "chrome/browser/extensions/extension_info_map.h" | 21 #include "chrome/browser/extensions/extension_info_map.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 80 } | 81 } |
| 81 | 82 |
| 82 // net::CookieMonster::Delegate implementation. | 83 // net::CookieMonster::Delegate implementation. |
| 83 virtual void OnCookieChanged( | 84 virtual void OnCookieChanged( |
| 84 const net::CookieMonster::CanonicalCookie& cookie, | 85 const net::CookieMonster::CanonicalCookie& cookie, |
| 85 bool removed, | 86 bool removed, |
| 86 net::CookieMonster::Delegate::ChangeCause cause) { | 87 net::CookieMonster::Delegate::ChangeCause cause) { |
| 87 BrowserThread::PostTask( | 88 BrowserThread::PostTask( |
| 88 BrowserThread::UI, FROM_HERE, | 89 BrowserThread::UI, FROM_HERE, |
| 89 NewRunnableMethod(this, | 90 base::Bind(&ChromeCookieMonsterDelegate::OnCookieChangedAsyncHelper, |
| 90 &ChromeCookieMonsterDelegate::OnCookieChangedAsyncHelper, | 91 this, cookie, removed, cause)); |
| 91 cookie, | |
| 92 removed, | |
| 93 cause)); | |
| 94 } | 92 } |
| 95 | 93 |
| 96 private: | 94 private: |
| 97 virtual ~ChromeCookieMonsterDelegate() {} | 95 virtual ~ChromeCookieMonsterDelegate() {} |
| 98 | 96 |
| 99 void OnCookieChangedAsyncHelper( | 97 void OnCookieChangedAsyncHelper( |
| 100 const net::CookieMonster::CanonicalCookie& cookie, | 98 const net::CookieMonster::CanonicalCookie& cookie, |
| 101 bool removed, | 99 bool removed, |
| 102 net::CookieMonster::Delegate::ChangeCause cause) { | 100 net::CookieMonster::Delegate::ChangeCause cause) { |
| 103 Profile* profile = profile_getter_.Run(); | 101 Profile* profile = profile_getter_.Run(); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 534 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 537 new DeleteTask<ProfileIOData>(this)); | 535 new DeleteTask<ProfileIOData>(this)); |
| 538 if (!posted) | 536 if (!posted) |
| 539 delete this; | 537 delete this; |
| 540 } | 538 } |
| 541 | 539 |
| 542 void ProfileIOData::set_origin_bound_cert_service( | 540 void ProfileIOData::set_origin_bound_cert_service( |
| 543 net::OriginBoundCertService* origin_bound_cert_service) const { | 541 net::OriginBoundCertService* origin_bound_cert_service) const { |
| 544 origin_bound_cert_service_.reset(origin_bound_cert_service); | 542 origin_bound_cert_service_.reset(origin_bound_cert_service); |
| 545 } | 543 } |
| OLD | NEW |