| 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/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 g_browser_process->profile_manager()->GetLastUsedProfile(); | 1093 g_browser_process->profile_manager()->GetLastUsedProfile(); |
| 1094 if (!profile) | 1094 if (!profile) |
| 1095 return; | 1095 return; |
| 1096 browser = Browser::Create(profile); | 1096 browser = Browser::Create(profile); |
| 1097 browser->OpenURL(params); | 1097 browser->OpenURL(params); |
| 1098 } else { | 1098 } else { |
| 1099 browser->OpenURL(params); | 1099 browser->OpenURL(params); |
| 1100 | 1100 |
| 1101 // In case the browser window is minimized, show it. If |browser| is a | 1101 // In case the browser window is minimized, show it. If |browser| is a |
| 1102 // non-tabbed window, the call to OpenURL above will have opened a | 1102 // non-tabbed window, the call to OpenURL above will have opened a |
| 1103 // TabContents in a tabbed browser, so we need to grab it with | 1103 // TabContentsWrapper in a tabbed browser, so we need to grab it with |
| 1104 // GetLastActive before the call to show(). | 1104 // GetLastActive before the call to show(). |
| 1105 if (!browser->is_type_tabbed()) { | 1105 if (!browser->is_type_tabbed()) { |
| 1106 browser = BrowserList::GetLastActive(); | 1106 browser = BrowserList::GetLastActive(); |
| 1107 DCHECK(browser); | 1107 DCHECK(browser); |
| 1108 } | 1108 } |
| 1109 } | 1109 } |
| 1110 browser->window()->Show(); | 1110 browser->window()->Show(); |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 bool TaskManagerModel::GetAndCacheMemoryMetrics(base::ProcessHandle handle, | 1113 bool TaskManagerModel::GetAndCacheMemoryMetrics(base::ProcessHandle handle, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 // Count the number of extensions with background pages (including | 1166 // Count the number of extensions with background pages (including |
| 1167 // incognito). | 1167 // incognito). |
| 1168 count += CountExtensionBackgroundPagesForProfile(profile); | 1168 count += CountExtensionBackgroundPagesForProfile(profile); |
| 1169 if (profile->HasOffTheRecordProfile()) { | 1169 if (profile->HasOffTheRecordProfile()) { |
| 1170 count += CountExtensionBackgroundPagesForProfile( | 1170 count += CountExtensionBackgroundPagesForProfile( |
| 1171 profile->GetOffTheRecordProfile()); | 1171 profile->GetOffTheRecordProfile()); |
| 1172 } | 1172 } |
| 1173 } | 1173 } |
| 1174 return count; | 1174 return count; |
| 1175 } | 1175 } |
| OLD | NEW |