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

Side by Side Diff: net/websockets/websocket_job_unittest.cc

Issue 6338002: net: Remove typedef net::URLRequestContext URLRequestContext; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for real Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (allow_all_cookies_) 170 if (allow_all_cookies_)
171 callback->Run(OK); 171 callback->Run(OK);
172 else 172 else
173 callback->Run(ERR_ACCESS_DENIED); 173 callback->Run(ERR_ACCESS_DENIED);
174 } 174 }
175 175
176 bool allow_all_cookies_; 176 bool allow_all_cookies_;
177 CompletionCallback* callback_; 177 CompletionCallback* callback_;
178 }; 178 };
179 179
180 class MockURLRequestContext : public URLRequestContext { 180 class MockURLRequestContext : public net::URLRequestContext {
wtc 2011/01/15 17:54:23 Undo this change (already in the 'net' namespace).
181 public: 181 public:
182 MockURLRequestContext(CookieStore* cookie_store, 182 MockURLRequestContext(CookieStore* cookie_store,
183 CookiePolicy* cookie_policy) { 183 CookiePolicy* cookie_policy) {
184 cookie_store_ = cookie_store; 184 cookie_store_ = cookie_store;
185 cookie_policy_ = cookie_policy; 185 cookie_policy_ = cookie_policy;
186 } 186 }
187 187
188 private: 188 private:
189 friend class base::RefCountedThreadSafe<MockURLRequestContext>; 189 friend class base::RefCountedThreadSafe<MockURLRequestContext>;
190 virtual ~MockURLRequestContext() {} 190 virtual ~MockURLRequestContext() {}
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 EXPECT_EQ(2U, cookie_store_->entries().size()); 515 EXPECT_EQ(2U, cookie_store_->entries().size());
516 EXPECT_EQ(cookieUrl, cookie_store_->entries()[0].url); 516 EXPECT_EQ(cookieUrl, cookie_store_->entries()[0].url);
517 EXPECT_EQ("CR-test=1", cookie_store_->entries()[0].cookie_line); 517 EXPECT_EQ("CR-test=1", cookie_store_->entries()[0].cookie_line);
518 EXPECT_EQ(cookieUrl, cookie_store_->entries()[1].url); 518 EXPECT_EQ(cookieUrl, cookie_store_->entries()[1].url);
519 EXPECT_EQ("CR-test-httponly=1", cookie_store_->entries()[1].cookie_line); 519 EXPECT_EQ("CR-test-httponly=1", cookie_store_->entries()[1].cookie_line);
520 520
521 CloseWebSocketJob(); 521 CloseWebSocketJob();
522 } 522 }
523 523
524 } // namespace net 524 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698