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

Side by Side Diff: chrome/browser/memory/tab_manager.cc

Issue 2741053005: [Chrome OS] Clean up BrowserTabStripTracker Init parameter. (Closed)
Patch Set: . Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/tab_manager.h" 5 #include "chrome/browser/memory/tab_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 #if !defined(OS_CHROMEOS) 148 #if !defined(OS_CHROMEOS)
149 minimum_protection_time_(base::TimeDelta::FromMinutes(10)), 149 minimum_protection_time_(base::TimeDelta::FromMinutes(10)),
150 #endif 150 #endif
151 browser_tab_strip_tracker_(this, nullptr, nullptr), 151 browser_tab_strip_tracker_(this, nullptr, nullptr),
152 test_tick_clock_(nullptr), 152 test_tick_clock_(nullptr),
153 under_memory_pressure_(false), 153 under_memory_pressure_(false),
154 weak_ptr_factory_(this) { 154 weak_ptr_factory_(this) {
155 #if defined(OS_CHROMEOS) 155 #if defined(OS_CHROMEOS)
156 delegate_.reset(new TabManagerDelegate(weak_ptr_factory_.GetWeakPtr())); 156 delegate_.reset(new TabManagerDelegate(weak_ptr_factory_.GetWeakPtr()));
157 #endif 157 #endif
158 browser_tab_strip_tracker_.Init( 158 browser_tab_strip_tracker_.Init();
159 BrowserTabStripTracker::InitWith::ALL_BROWERS);
160 159
161 // Set up default callbacks. These may be overridden post-construction as 160 // Set up default callbacks. These may be overridden post-construction as
162 // testing seams. 161 // testing seams.
163 get_current_pressure_level_ = base::Bind(&GetCurrentPressureLevel); 162 get_current_pressure_level_ = base::Bind(&GetCurrentPressureLevel);
164 notify_renderer_process_ = base::Bind(&NotifyRendererProcess); 163 notify_renderer_process_ = base::Bind(&NotifyRendererProcess);
165 } 164 }
166 165
167 TabManager::~TabManager() { 166 TabManager::~TabManager() {
168 Stop(); 167 Stop();
169 } 168 }
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 // platform. 1030 // platform.
1032 std::string allow_multiple_discards = variations::GetVariationParamValue( 1031 std::string allow_multiple_discards = variations::GetVariationParamValue(
1033 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards"); 1032 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards");
1034 return (allow_multiple_discards != "true"); 1033 return (allow_multiple_discards != "true");
1035 #else 1034 #else
1036 return false; 1035 return false;
1037 #endif 1036 #endif
1038 } 1037 }
1039 1038
1040 } // namespace memory 1039 } // namespace memory
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/web_navigation_api.cc ('k') | chrome/browser/metrics/tab_reactivation_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698