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/cookie_settings.h" | 19 #include "chrome/browser/content_settings/cookie_settings.h" |
19 #include "chrome/browser/content_settings/host_content_settings_map.h" | 20 #include "chrome/browser/content_settings/host_content_settings_map.h" |
20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 21 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
84 } | 85 } |
85 | 86 |
86 // net::CookieMonster::Delegate implementation. | 87 // net::CookieMonster::Delegate implementation. |
87 virtual void OnCookieChanged( | 88 virtual void OnCookieChanged( |
88 const net::CookieMonster::CanonicalCookie& cookie, | 89 const net::CookieMonster::CanonicalCookie& cookie, |
89 bool removed, | 90 bool removed, |
90 net::CookieMonster::Delegate::ChangeCause cause) { | 91 net::CookieMonster::Delegate::ChangeCause cause) { |
91 BrowserThread::PostTask( | 92 BrowserThread::PostTask( |
92 BrowserThread::UI, FROM_HERE, | 93 BrowserThread::UI, FROM_HERE, |
93 NewRunnableMethod(this, | 94 base::Bind(&ChromeCookieMonsterDelegate::OnCookieChangedAsyncHelper, |
94 &ChromeCookieMonsterDelegate::OnCookieChangedAsyncHelper, | 95 this, cookie, removed, cause)); |
95 cookie, | |
96 removed, | |
97 cause)); | |
98 } | 96 } |
99 | 97 |
100 private: | 98 private: |
101 virtual ~ChromeCookieMonsterDelegate() {} | 99 virtual ~ChromeCookieMonsterDelegate() {} |
102 | 100 |
103 void OnCookieChangedAsyncHelper( | 101 void OnCookieChangedAsyncHelper( |
104 const net::CookieMonster::CanonicalCookie& cookie, | 102 const net::CookieMonster::CanonicalCookie& cookie, |
105 bool removed, | 103 bool removed, |
106 net::CookieMonster::Delegate::ChangeCause cause) { | 104 net::CookieMonster::Delegate::ChangeCause cause) { |
107 Profile* profile = profile_getter_.Run(); | 105 Profile* profile = profile_getter_.Run(); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 553 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
556 new DeleteTask<ProfileIOData>(this)); | 554 new DeleteTask<ProfileIOData>(this)); |
557 if (!posted) | 555 if (!posted) |
558 delete this; | 556 delete this; |
559 } | 557 } |
560 | 558 |
561 void ProfileIOData::set_origin_bound_cert_service( | 559 void ProfileIOData::set_origin_bound_cert_service( |
562 net::OriginBoundCertService* origin_bound_cert_service) const { | 560 net::OriginBoundCertService* origin_bound_cert_service) const { |
563 origin_bound_cert_service_.reset(origin_bound_cert_service); | 561 origin_bound_cert_service_.reset(origin_bound_cert_service); |
564 } | 562 } |
OLD | NEW |