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

Side by Side Diff: net/base/cookie_monster_unittest.cc

Issue 8915024: Retry 114494 - Remove BindStateHolder and have Bind() return a Callback<> object directly." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 | « media/base/demuxer_stream.h ('k') | net/base/cookie_store_test_helpers.h » ('j') | 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) 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 <time.h> 5 #include <time.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 private: 138 private:
139 bool result_; 139 bool result_;
140 }; 140 };
141 141
142 class GetCookieStringCallback : public CookieCallback { 142 class GetCookieStringCallback : public CookieCallback {
143 public: 143 public:
144 GetCookieStringCallback() {} 144 GetCookieStringCallback() {}
145 explicit GetCookieStringCallback(Thread* run_in_thread) 145 explicit GetCookieStringCallback(Thread* run_in_thread)
146 : CookieCallback(run_in_thread) {} 146 : CookieCallback(run_in_thread) {}
147 147
148 void Run(std::string cookie) { 148 void Run(const std::string& cookie) {
149 cookie_ = cookie; 149 cookie_ = cookie;
150 CallbackEpilogue(); 150 CallbackEpilogue();
151 } 151 }
152 152
153 const std::string& cookie() { return cookie_; } 153 const std::string& cookie() { return cookie_; }
154 154
155 private: 155 private:
156 std::string cookie_; 156 std::string cookie_;
157 }; 157 };
158 158
(...skipping 3452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 // Delete the cookie. 3611 // Delete the cookie.
3612 DeleteCookie(cm, url_google_, "A"); 3612 DeleteCookie(cm, url_google_, "A");
3613 EXPECT_EQ("", GetCookies(cm, url_google_)); 3613 EXPECT_EQ("", GetCookies(cm, url_google_));
3614 EXPECT_EQ(4u, store->commands().size()); 3614 EXPECT_EQ(4u, store->commands().size());
3615 EXPECT_EQ(CookieStoreCommand::REMOVE, store->commands()[3].type); 3615 EXPECT_EQ(CookieStoreCommand::REMOVE, store->commands()[3].type);
3616 EXPECT_EQ("A", store->commands()[3].cookie.Name()); 3616 EXPECT_EQ("A", store->commands()[3].cookie.Name());
3617 EXPECT_EQ("C", store->commands()[3].cookie.Value()); 3617 EXPECT_EQ("C", store->commands()[3].cookie.Value());
3618 } 3618 }
3619 3619
3620 } // namespace net 3620 } // namespace net
OLDNEW
« no previous file with comments | « media/base/demuxer_stream.h ('k') | net/base/cookie_store_test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698