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

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

Issue 2798143004: Fix for URL opening code (Closed)
Patch Set: Fixed opening local file with Chromium on mac while restore session is enabled. File opens in the t… Created 3 years, 8 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 741
742 } // namespace 742 } // namespace
743 743
744 // SessionRestore ------------------------------------------------------------- 744 // SessionRestore -------------------------------------------------------------
745 745
746 // static 746 // static
747 Browser* SessionRestore::RestoreSession( 747 Browser* SessionRestore::RestoreSession(
748 Profile* profile, Browser* browser, 748 Profile* profile, Browser* browser,
749 SessionRestore::BehaviorBitmask behavior, 749 SessionRestore::BehaviorBitmask behavior,
750 const std::vector<GURL>& urls_to_open) { 750 const std::vector<GURL>& urls_to_open) {
751 VLOG(0) << "RestoreSession";
sky 2017/04/17 17:13:34 Is there a reason for this? At best I could see a
751 #if defined(OS_CHROMEOS) 752 #if defined(OS_CHROMEOS)
752 chromeos::BootTimesRecorder::Get()->AddLoginTimeMarker( 753 chromeos::BootTimesRecorder::Get()->AddLoginTimeMarker(
753 "SessionRestore-Start", false); 754 "SessionRestore-Start", false);
754 #endif 755 #endif
755 DCHECK(profile); 756 DCHECK(profile);
756 // Always restore from the original profile (incognito profiles have no 757 // Always restore from the original profile (incognito profiles have no
757 // session service). 758 // session service).
758 profile = profile->GetOriginalProfile(); 759 profile = profile->GetOriginalProfile();
759 if (!SessionServiceFactory::GetForProfile(profile)) { 760 if (!SessionServiceFactory::GetForProfile(profile)) {
760 NOTREACHED(); 761 NOTREACHED();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // static 844 // static
844 SessionRestore::CallbackSubscription 845 SessionRestore::CallbackSubscription
845 SessionRestore::RegisterOnSessionRestoredCallback( 846 SessionRestore::RegisterOnSessionRestoredCallback(
846 const base::Callback<void(int)>& callback) { 847 const base::Callback<void(int)>& callback) {
847 return on_session_restored_callbacks()->Add(callback); 848 return on_session_restored_callbacks()->Add(callback);
848 } 849 }
849 850
850 // static 851 // static
851 base::CallbackList<void(int)>* 852 base::CallbackList<void(int)>*
852 SessionRestore::on_session_restored_callbacks_ = nullptr; 853 SessionRestore::on_session_restored_callbacks_ = nullptr;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698