| OLD | NEW |
| 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/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 <string> | 10 #include <string> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
| 41 #include "content/public/browser/web_contents_view.h" | 41 #include "content/public/browser/web_contents_view.h" |
| 42 #include "net/base/network_change_notifier.h" | 42 #include "net/base/network_change_notifier.h" |
| 43 #include "webkit/glue/glue_serialize.h" | 43 #include "webkit/glue/glue_serialize.h" |
| 44 | 44 |
| 45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| 46 #include "chrome/browser/chromeos/boot_times_loader.h" | 46 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 using content::NavigationController; | 49 using content::NavigationController; |
| 50 using content::RenderWidgetHost; |
| 50 using content::WebContents; | 51 using content::WebContents; |
| 51 | 52 |
| 52 namespace { | 53 namespace { |
| 53 | 54 |
| 54 class SessionRestoreImpl; | 55 class SessionRestoreImpl; |
| 55 | 56 |
| 56 // Pointers to SessionRestoreImpls which are currently restoring the session. | 57 // Pointers to SessionRestoreImpls which are currently restoring the session. |
| 57 std::set<SessionRestoreImpl*>* active_session_restorers = NULL; | 58 std::set<SessionRestoreImpl*>* active_session_restorers = NULL; |
| 58 | 59 |
| 59 // TabLoader ------------------------------------------------------------------ | 60 // TabLoader ------------------------------------------------------------------ |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 if (active_session_restorers == NULL) | 961 if (active_session_restorers == NULL) |
| 961 return false; | 962 return false; |
| 962 for (std::set<SessionRestoreImpl*>::const_iterator it = | 963 for (std::set<SessionRestoreImpl*>::const_iterator it = |
| 963 active_session_restorers->begin(); | 964 active_session_restorers->begin(); |
| 964 it != active_session_restorers->end(); ++it) { | 965 it != active_session_restorers->end(); ++it) { |
| 965 if ((*it)->profile() == profile) | 966 if ((*it)->profile() == profile) |
| 966 return true; | 967 return true; |
| 967 } | 968 } |
| 968 return false; | 969 return false; |
| 969 } | 970 } |
| OLD | NEW |