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

Side by Side Diff: chrome/common/resource_dispatcher_unittest.cc

Issue 326003: Make GetURLForDebugging return a const GURL (Closed)
Patch Set: no const Created 11 years, 1 month 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
« no previous file with comments | « chrome/common/resource_dispatcher.cc ('k') | chrome/common/security_filter_peer.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 virtual void OnUploadProgress(uint64 position, uint64 size) { 51 virtual void OnUploadProgress(uint64 position, uint64 size) {
52 } 52 }
53 53
54 virtual void OnCompletedRequest(const URLRequestStatus& status, 54 virtual void OnCompletedRequest(const URLRequestStatus& status,
55 const std::string& security_info) { 55 const std::string& security_info) {
56 EXPECT_FALSE(complete_); 56 EXPECT_FALSE(complete_);
57 complete_ = true; 57 complete_ = true;
58 } 58 }
59 59
60 virtual std::string GetURLForDebugging() { 60 virtual GURL GetURLForDebugging() const {
61 return std::string(); 61 return GURL();
62 } 62 }
63 63
64 const std::string& data() const { 64 const std::string& data() const {
65 return data_; 65 return data_;
66 } 66 }
67 const bool complete() const { 67 const bool complete() const {
68 return complete_; 68 return complete_;
69 } 69 }
70 70
71 private: 71 private:
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 set_defer_loading(false); 252 set_defer_loading(false);
253 } 253 }
254 254
255 virtual void OnUploadProgress(uint64 position, uint64 size) { 255 virtual void OnUploadProgress(uint64 position, uint64 size) {
256 } 256 }
257 257
258 virtual void OnCompletedRequest(const URLRequestStatus& status, 258 virtual void OnCompletedRequest(const URLRequestStatus& status,
259 const std::string& security_info) { 259 const std::string& security_info) {
260 } 260 }
261 261
262 virtual std::string GetURLForDebugging() { 262 virtual GURL GetURLForDebugging() const {
263 return std::string(); 263 return GURL();
264 } 264 }
265 265
266 protected: 266 protected:
267 virtual void SetUp() { 267 virtual void SetUp() {
268 EXPECT_EQ(true, shared_handle_.Create(L"DeferredResourceLoaderTest", false, 268 EXPECT_EQ(true, shared_handle_.Create(L"DeferredResourceLoaderTest", false,
269 false, 100)); 269 false, 100));
270 ResourceDispatcherTest::SetUp(); 270 ResourceDispatcherTest::SetUp();
271 } 271 }
272 272
273 virtual void TearDown() { 273 virtual void TearDown() {
(...skipping 21 matching lines...) Expand all
295 ResourceLoaderBridge* bridge = CreateBridge(); 295 ResourceLoaderBridge* bridge = CreateBridge();
296 296
297 bridge->Start(this); 297 bridge->Start(this);
298 InitMessages(); 298 InitMessages();
299 299
300 // Dispatch deferred messages. 300 // Dispatch deferred messages.
301 message_loop.RunAllPending(); 301 message_loop.RunAllPending();
302 delete bridge; 302 delete bridge;
303 } 303 }
304 304
OLDNEW
« no previous file with comments | « chrome/common/resource_dispatcher.cc ('k') | chrome/common/security_filter_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698