| Index: chrome/browser/sessions/session_restore.cc
|
| diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
|
| index 82d6432b38bc273c043928e2093f387a7f7fa0f1..b1f27335cceafe75034aa52f6562f9a1c5d4e1d3 100644
|
| --- a/chrome/browser/sessions/session_restore.cc
|
| +++ b/chrome/browser/sessions/session_restore.cc
|
| @@ -16,6 +16,7 @@
|
| #include "base/debug/alias.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/scoped_vector.h"
|
| +#include "base/metrics/field_trial.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/run_loop.h"
|
| #include "base/stl_util.h"
|
| @@ -298,7 +299,9 @@ class SessionRestoreImpl : public content::NotificationObserver {
|
|
|
| if (succeeded) {
|
| // Start Loading tabs.
|
| - SessionRestoreDelegate::RestoreTabs(contents_created, restore_started_);
|
| + bool active_only = SessionRestore::WillLoadActiveTabsOnly();
|
| + SessionRestoreDelegate::RestoreTabs(contents_created, restore_started_,
|
| + active_only);
|
| }
|
|
|
| if (!synchronous_) {
|
| @@ -818,5 +821,14 @@ SessionRestore::CallbackSubscription
|
| }
|
|
|
| // static
|
| +bool SessionRestore::WillLoadActiveTabsOnly() {
|
| + base::FieldTrial* trial =
|
| + base::FieldTrialList::Find("SessionRestoreBackgroundLoading");
|
| + if (!trial || trial->group_name() == "Restore")
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| +// static
|
| base::CallbackList<void(int)>*
|
| SessionRestore::on_session_restored_callbacks_ = nullptr;
|
|
|