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

Side by Side Diff: chrome/browser/sessions/session_restore_test_helper.cc

Issue 902613003: Record the number of tabs in a session restore in SampledProfile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more detailed description of meaning of num tabs, given by sky Created 5 years, 10 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
« no previous file with comments | « chrome/browser/sessions/session_restore_test_helper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/sessions/session_restore_test_helper.h" 5 #include "chrome/browser/sessions/session_restore_test_helper.h"
6 6
7 #include "content/public/test/test_utils.h" 7 #include "content/public/test/test_utils.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 SessionRestoreTestHelper::SessionRestoreTestHelper() 10 SessionRestoreTestHelper::SessionRestoreTestHelper()
(...skipping 11 matching lines...) Expand all
22 void SessionRestoreTestHelper::Wait() { 22 void SessionRestoreTestHelper::Wait() {
23 if (restore_notification_seen_) 23 if (restore_notification_seen_)
24 return; 24 return;
25 25
26 loop_is_running_ = true; 26 loop_is_running_ = true;
27 message_loop_runner_ = new content::MessageLoopRunner; 27 message_loop_runner_ = new content::MessageLoopRunner;
28 message_loop_runner_->Run(); 28 message_loop_runner_->Run();
29 EXPECT_TRUE(restore_notification_seen_); 29 EXPECT_TRUE(restore_notification_seen_);
30 } 30 }
31 31
32 void SessionRestoreTestHelper::OnSessionRestoreDone() { 32 void SessionRestoreTestHelper::OnSessionRestoreDone(
33 int /* num_tabs_restored */) {
33 restore_notification_seen_ = true; 34 restore_notification_seen_ = true;
34 if (!loop_is_running_) 35 if (!loop_is_running_)
35 return; 36 return;
36 37
37 message_loop_runner_->Quit(); 38 message_loop_runner_->Quit();
38 loop_is_running_ = false; 39 loop_is_running_ = false;
39 } 40 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_test_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698