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/browsing_data_cookie_helper.h" | 5 #include "chrome/browser/browsing_data_cookie_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "net/url_request/url_request_context.h" | 13 #include "net/url_request/url_request_context.h" |
14 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
15 | 15 |
| 16 using content::BrowserThread; |
| 17 |
16 BrowsingDataCookieHelper::BrowsingDataCookieHelper(Profile* profile) | 18 BrowsingDataCookieHelper::BrowsingDataCookieHelper(Profile* profile) |
17 : is_fetching_(false), | 19 : is_fetching_(false), |
18 profile_(profile), | 20 profile_(profile), |
19 request_context_getter_(profile->GetRequestContext()) { | 21 request_context_getter_(profile->GetRequestContext()) { |
20 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
21 } | 23 } |
22 | 24 |
23 BrowsingDataCookieHelper::~BrowsingDataCookieHelper() { | 25 BrowsingDataCookieHelper::~BrowsingDataCookieHelper() { |
24 } | 26 } |
25 | 27 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 cookie != cookie_list_.end(); ++cookie) { | 171 cookie != cookie_list_.end(); ++cookie) { |
170 if (cookie->Name() == add_cookie.Name() && | 172 if (cookie->Name() == add_cookie.Name() && |
171 cookie->Domain() == add_cookie.Domain()&& | 173 cookie->Domain() == add_cookie.Domain()&& |
172 cookie->Path() == add_cookie.Path()) { | 174 cookie->Path() == add_cookie.Path()) { |
173 cookie_list_.erase(cookie); | 175 cookie_list_.erase(cookie); |
174 return true; | 176 return true; |
175 } | 177 } |
176 } | 178 } |
177 return false; | 179 return false; |
178 } | 180 } |
OLD | NEW |