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

Side by Side Diff: components/sessions/serialized_navigation_entry_test_helper.cc

Issue 22837005: Add HTTP status code to navigation data structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bug Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "components/sessions/serialized_navigation_entry_test_helper.h" 5 #include "components/sessions/serialized_navigation_entry_test_helper.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "components/sessions/serialized_navigation_entry.h" 9 #include "components/sessions/serialized_navigation_entry.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 25 matching lines...) Expand all
36 SerializedNavigationEntry navigation; 36 SerializedNavigationEntry navigation;
37 navigation.index_ = 0; 37 navigation.index_ = 0;
38 navigation.referrer_ = 38 navigation.referrer_ =
39 content::Referrer(GURL("http://www.referrer.com"), 39 content::Referrer(GURL("http://www.referrer.com"),
40 WebKit::WebReferrerPolicyDefault); 40 WebKit::WebReferrerPolicyDefault);
41 navigation.virtual_url_ = GURL(virtual_url); 41 navigation.virtual_url_ = GURL(virtual_url);
42 navigation.title_ = UTF8ToUTF16(title); 42 navigation.title_ = UTF8ToUTF16(title);
43 navigation.page_state_ = 43 navigation.page_state_ =
44 content::PageState::CreateFromEncodedData("fake_state"); 44 content::PageState::CreateFromEncodedData("fake_state");
45 navigation.timestamp_ = base::Time::Now(); 45 navigation.timestamp_ = base::Time::Now();
46 navigation.http_status_code_ = 200;
46 return navigation; 47 return navigation;
47 } 48 }
48 49
49 // static 50 // static
50 void SerializedNavigationEntryTestHelper::SetPageState( 51 void SerializedNavigationEntryTestHelper::SetPageState(
51 const content::PageState& page_state, 52 const content::PageState& page_state,
52 SerializedNavigationEntry* navigation) { 53 SerializedNavigationEntry* navigation) {
53 navigation->page_state_ = page_state; 54 navigation->page_state_ = page_state;
54 } 55 }
55 56
(...skipping 19 matching lines...) Expand all
75 } 76 }
76 77
77 // static 78 // static
78 void SerializedNavigationEntryTestHelper::SetTimestamp( 79 void SerializedNavigationEntryTestHelper::SetTimestamp(
79 base::Time timestamp, 80 base::Time timestamp,
80 SerializedNavigationEntry* navigation) { 81 SerializedNavigationEntry* navigation) {
81 navigation->timestamp_ = timestamp; 82 navigation->timestamp_ = timestamp;
82 } 83 }
83 84
84 } // namespace sessions 85 } // namespace sessions
OLDNEW
« no previous file with comments | « components/sessions/serialized_navigation_entry.cc ('k') | components/sessions/serialized_navigation_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698