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

Side by Side Diff: chrome/browser/ui/fast_unload_controller.cc

Issue 2335203003: Add metrics to keep track of the tab activate/deactivate cycle (Closed)
Patch Set: Addressed comments Created 4 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 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 "chrome/browser/ui/fast_unload_controller.h" 5 #include "chrome/browser/ui/fast_unload_controller.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type); 281 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
282 282
283 registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, 283 registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
284 source); 284 source);
285 ClearUnloadState(content::Source<content::WebContents>(source).ptr()); 285 ClearUnloadState(content::Source<content::WebContents>(source).ptr());
286 } 286 }
287 287
288 //////////////////////////////////////////////////////////////////////////////// 288 ////////////////////////////////////////////////////////////////////////////////
289 // FastUnloadController, TabStripModelObserver implementation: 289 // FastUnloadController, TabStripModelObserver implementation:
290 290
291 void FastUnloadController::TabInsertedAt(content::WebContents* contents, 291 void FastUnloadController::TabInsertedAt(TabStripModel* tab_strip_model,
292 content::WebContents* contents,
292 int index, 293 int index,
293 bool foreground) { 294 bool foreground) {
294 TabAttachedImpl(contents); 295 TabAttachedImpl(contents);
295 } 296 }
296 297
297 void FastUnloadController::TabDetachedAt(content::WebContents* contents, 298 void FastUnloadController::TabDetachedAt(content::WebContents* contents,
298 int index) { 299 int index) {
299 TabDetachedImpl(contents); 300 TabDetachedImpl(contents);
300 } 301 }
301 302
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 473 }
473 } 474 }
474 475
475 void FastUnloadController::PostTaskForProcessPendingTabs() { 476 void FastUnloadController::PostTaskForProcessPendingTabs() {
476 base::ThreadTaskRunnerHandle::Get()->PostTask( 477 base::ThreadTaskRunnerHandle::Get()->PostTask(
477 FROM_HERE, base::Bind(&FastUnloadController::ProcessPendingTabs, 478 FROM_HERE, base::Bind(&FastUnloadController::ProcessPendingTabs,
478 weak_factory_.GetWeakPtr())); 479 weak_factory_.GetWeakPtr()));
479 } 480 }
480 481
481 } // namespace chrome 482 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698