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

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

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/sessions/session_restore.h" 5 #include "chrome/browser/sessions/session_restore.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Since FinishedTabCreation() is not called here, |this| will leak if we 238 // Since FinishedTabCreation() is not called here, |this| will leak if we
239 // are not in sychronous mode. 239 // are not in sychronous mode.
240 DCHECK(synchronous_); 240 DCHECK(synchronous_);
241 241
242 on_session_restored_callbacks_->Notify(1); 242 on_session_restored_callbacks_->Notify(1);
243 243
244 return web_contents; 244 return web_contents;
245 } 245 }
246 246
247 ~SessionRestoreImpl() override { 247 ~SessionRestoreImpl() override {
248 STLDeleteElements(&windows_); 248 base::STLDeleteElements(&windows_);
249 249
250 active_session_restorers->erase(this); 250 active_session_restorers->erase(this);
251 if (active_session_restorers->empty()) { 251 if (active_session_restorers->empty()) {
252 delete active_session_restorers; 252 delete active_session_restorers;
253 active_session_restorers = nullptr; 253 active_session_restorers = nullptr;
254 } 254 }
255 } 255 }
256 256
257 void Observe(int type, 257 void Observe(int type,
258 const content::NotificationSource& source, 258 const content::NotificationSource& source,
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 // static 838 // static
839 SessionRestore::CallbackSubscription 839 SessionRestore::CallbackSubscription
840 SessionRestore::RegisterOnSessionRestoredCallback( 840 SessionRestore::RegisterOnSessionRestoredCallback(
841 const base::Callback<void(int)>& callback) { 841 const base::Callback<void(int)>& callback) {
842 return on_session_restored_callbacks()->Add(callback); 842 return on_session_restored_callbacks()->Add(callback);
843 } 843 }
844 844
845 // static 845 // static
846 base::CallbackList<void(int)>* 846 base::CallbackList<void(int)>*
847 SessionRestore::on_session_restored_callbacks_ = nullptr; 847 SessionRestore::on_session_restored_callbacks_ = nullptr;
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc ('k') | chrome/browser/shell_integration_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698