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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 821453003: Update legacy Tuple-using code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 switches::kEnableBrowserSideNavigation)) { 218 switches::kEnableBrowserSideNavigation)) {
219 return process()->sink().GetFirstMessageMatching( 219 return process()->sink().GetFirstMessageMatching(
220 FrameMsg_RequestNavigation::ID); 220 FrameMsg_RequestNavigation::ID);
221 } 221 }
222 return process()->sink().GetFirstMessageMatching(FrameMsg_Navigate::ID); 222 return process()->sink().GetFirstMessageMatching(FrameMsg_Navigate::ID);
223 } 223 }
224 224
225 const GURL GetNavigationURLFromIPC(const IPC::Message* message) { 225 const GURL GetNavigationURLFromIPC(const IPC::Message* message) {
226 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 226 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
227 switches::kEnableBrowserSideNavigation)) { 227 switches::kEnableBrowserSideNavigation)) {
228 Tuple2<CommonNavigationParams, RequestNavigationParams> nav_params; 228 Tuple<CommonNavigationParams, RequestNavigationParams> nav_params;
229 FrameMsg_RequestNavigation::Read(message, &nav_params); 229 FrameMsg_RequestNavigation::Read(message, &nav_params);
230 return nav_params.a.url; 230 return get<0>(nav_params).url;
231 } 231 }
232 Tuple1<FrameMsg_Navigate_Params> nav_params; 232 Tuple<FrameMsg_Navigate_Params> nav_params;
233 FrameMsg_Navigate::Read(message, &nav_params); 233 FrameMsg_Navigate::Read(message, &nav_params);
234 return nav_params.a.common_params.url; 234 return get<0>(nav_params).common_params.url;
235 } 235 }
236 236
237 protected: 237 protected:
238 GURL navigated_url_; 238 GURL navigated_url_;
239 size_t navigation_entry_committed_counter_; 239 size_t navigation_entry_committed_counter_;
240 }; 240 };
241 241
242 void RegisterForAllNavNotifications(TestNotificationTracker* tracker, 242 void RegisterForAllNavNotifications(TestNotificationTracker* tracker,
243 NavigationController* controller) { 243 NavigationController* controller) {
244 tracker->ListenFor(NOTIFICATION_NAV_LIST_PRUNED, 244 tracker->ListenFor(NOTIFICATION_NAV_LIST_PRUNED,
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4387 params.post_id = -1; 4387 params.post_id = -1;
4388 contents()->GetMainFrame()->SendNavigateWithParams(&params); 4388 contents()->GetMainFrame()->SendNavigateWithParams(&params);
4389 4389
4390 // Now reload. replaceState overrides the POST, so we should not show a 4390 // Now reload. replaceState overrides the POST, so we should not show a
4391 // repost warning dialog. 4391 // repost warning dialog.
4392 controller_impl().Reload(true); 4392 controller_impl().Reload(true);
4393 EXPECT_EQ(0, delegate->repost_form_warning_count()); 4393 EXPECT_EQ(0, delegate->repost_form_warning_count());
4394 } 4394 }
4395 4395
4396 } // namespace content 4396 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698