Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/browsing_data_cookie_helper.cc

Issue 10084009: Remove duplicated |profile_| attribute in |CannedBrowsingDataCookieHelper|. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browsing_data_cookie_helper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 request_context_getter_->GetURLRequestContext()-> 83 request_context_getter_->GetURLRequestContext()->
84 cookie_store()->GetCookieMonster(); 84 cookie_store()->GetCookieMonster();
85 if (cookie_monster) { 85 if (cookie_monster) {
86 cookie_monster->DeleteCanonicalCookieAsync( 86 cookie_monster->DeleteCanonicalCookieAsync(
87 cookie, net::CookieMonster::DeleteCookieCallback()); 87 cookie, net::CookieMonster::DeleteCookieCallback());
88 } 88 }
89 } 89 }
90 90
91 CannedBrowsingDataCookieHelper::CannedBrowsingDataCookieHelper( 91 CannedBrowsingDataCookieHelper::CannedBrowsingDataCookieHelper(
92 Profile* profile) 92 Profile* profile)
93 : BrowsingDataCookieHelper(profile), 93 : BrowsingDataCookieHelper(profile) {
94 profile_(profile) {
95 } 94 }
96 95
97 CannedBrowsingDataCookieHelper::~CannedBrowsingDataCookieHelper() {} 96 CannedBrowsingDataCookieHelper::~CannedBrowsingDataCookieHelper() {}
98 97
99 CannedBrowsingDataCookieHelper* CannedBrowsingDataCookieHelper::Clone() { 98 CannedBrowsingDataCookieHelper* CannedBrowsingDataCookieHelper::Clone() {
100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 99 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
101 CannedBrowsingDataCookieHelper* clone = 100 CannedBrowsingDataCookieHelper* clone =
102 new CannedBrowsingDataCookieHelper(profile_); 101 new CannedBrowsingDataCookieHelper(profile());
103 102
104 clone->cookie_list_ = cookie_list_; 103 clone->cookie_list_ = cookie_list_;
105 return clone; 104 return clone;
106 } 105 }
107 106
108 void CannedBrowsingDataCookieHelper::AddReadCookies( 107 void CannedBrowsingDataCookieHelper::AddReadCookies(
109 const GURL& url, 108 const GURL& url,
110 const net::CookieList& cookie_list) { 109 const net::CookieList& cookie_list) {
111 typedef net::CookieList::const_iterator cookie_iterator; 110 typedef net::CookieList::const_iterator cookie_iterator;
112 for (cookie_iterator add_cookie = cookie_list.begin(); 111 for (cookie_iterator add_cookie = cookie_list.begin();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 cookie != cookie_list_.end(); ++cookie) { 160 cookie != cookie_list_.end(); ++cookie) {
162 if (cookie->Name() == add_cookie.Name() && 161 if (cookie->Name() == add_cookie.Name() &&
163 cookie->Domain() == add_cookie.Domain()&& 162 cookie->Domain() == add_cookie.Domain()&&
164 cookie->Path() == add_cookie.Path()) { 163 cookie->Path() == add_cookie.Path()) {
165 cookie_list_.erase(cookie); 164 cookie_list_.erase(cookie);
166 return true; 165 return true;
167 } 166 }
168 } 167 }
169 return false; 168 return false;
170 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_cookie_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698