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

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

Issue 6674043: Rewritten MountLibrary to work with non-blocking mount API calls in libcros.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 bool schedule_load) { 646 bool schedule_load) {
647 DCHECK(!tab.navigations.empty()); 647 DCHECK(!tab.navigations.empty());
648 int selected_index = tab.current_navigation_index; 648 int selected_index = tab.current_navigation_index;
649 selected_index = std::max( 649 selected_index = std::max(
650 0, 650 0,
651 std::min(selected_index, 651 std::min(selected_index,
652 static_cast<int>(tab.navigations.size() - 1))); 652 static_cast<int>(tab.navigations.size() - 1)));
653 653
654 // Record an app launch, if applicable. 654 // Record an app launch, if applicable.
655 GURL url = tab.navigations.at(tab.current_navigation_index).virtual_url(); 655 GURL url = tab.navigations.at(tab.current_navigation_index).virtual_url();
656 DCHECK(browser->profile()->GetExtensionService()); 656 if (
657 if (browser->profile()->GetExtensionService()->IsInstalledApp(url)) { 657 #if defined(OS_CHROMEOS)
xiyuan 2011/03/17 00:23:32 Is this file used for non-chromeos build at all?
zel 2011/03/17 01:00:30 Yes it is.
xiyuan 2011/03/17 01:54:03 Yep. Sorry I misread the file name and thought it
658 browser->profile()->GetExtensionService() &&
659 #endif
660 browser->profile()->GetExtensionService()->IsInstalledApp(url)) {
658 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 661 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
659 extension_misc::APP_LAUNCH_SESSION_RESTORE, 662 extension_misc::APP_LAUNCH_SESSION_RESTORE,
660 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 663 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
661 } 664 }
662 665
663 TabContents* tab_contents = 666 TabContents* tab_contents =
664 browser->AddRestoredTab(tab.navigations, 667 browser->AddRestoredTab(tab.navigations,
665 tab_index, 668 tab_index,
666 selected_index, 669 selected_index,
667 tab.extension_app_id, 670 tab.extension_app_id,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 Browser* SessionRestore::RestoreSessionSynchronously( 839 Browser* SessionRestore::RestoreSessionSynchronously(
837 Profile* profile, 840 Profile* profile,
838 const std::vector<GURL>& urls_to_open) { 841 const std::vector<GURL>& urls_to_open) {
839 return Restore(profile, NULL, true, false, true, urls_to_open); 842 return Restore(profile, NULL, true, false, true, urls_to_open);
840 } 843 }
841 844
842 // static 845 // static
843 bool SessionRestore::IsRestoring() { 846 bool SessionRestore::IsRestoring() {
844 return restoring; 847 return restoring;
845 } 848 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698