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

Side by Side Diff: chrome/browser/extensions/state_store_notification_observer.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/state_store_notification_observer.h" 5 #include "chrome/browser/extensions/state_store_notification_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "extensions/browser/state_store.h" 10 #include "extensions/browser/state_store.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 StateStoreNotificationObserver::StateStoreNotificationObserver( 14 StateStoreNotificationObserver::StateStoreNotificationObserver(
15 StateStore* state_store) 15 StateStore* state_store)
16 : state_store_(state_store) { 16 : state_store_(state_store) {
17 on_session_restored_callback_subscription_ = 17 on_session_restored_callback_subscription_ =
18 SessionRestore::RegisterOnSessionRestoredCallback( 18 SessionRestore::RegisterOnSessionRestoredCallback(
19 base::Bind(&StateStoreNotificationObserver::OnSessionRestoreDone, 19 base::Bind(&StateStoreNotificationObserver::OnSessionRestoreDone,
20 base::Unretained(this))); 20 base::Unretained(this)));
21 } 21 }
22 22
23 StateStoreNotificationObserver::~StateStoreNotificationObserver() { 23 StateStoreNotificationObserver::~StateStoreNotificationObserver() {
24 } 24 }
25 25
26 void StateStoreNotificationObserver::OnSessionRestoreDone() { 26 void StateStoreNotificationObserver::OnSessionRestoreDone(
27 int /* num_tabs_restored */) {
27 on_session_restored_callback_subscription_.reset(); 28 on_session_restored_callback_subscription_.reset();
28 state_store_->RequestInitAfterDelay(); 29 state_store_->RequestInitAfterDelay();
29 } 30 }
30 31
31 } // namespace extensions 32 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/state_store_notification_observer.h ('k') | chrome/browser/metrics/perf_provider_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698