| 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/page_cycler/page_cycler.h" | 5 #include "chrome/browser/page_cycler/page_cycler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "chrome/app/chrome_command_ids.h" | 14 #include "chrome/app/chrome_command_ids.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/browser_commands.h" | 17 #include "chrome/browser/ui/browser_commands.h" |
| 18 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/test/base/chrome_process_util.h" | 20 #include "chrome/test/base/chrome_process_util.h" |
| 21 #include "chrome/test/perf/perf_test.h" | 21 #include "chrome/test/perf/perf_test.h" |
| 22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
| 24 #include "content/public/browser/render_view_host.h" | 24 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
| 27 #include "testing/perf/perf_test.h" |
| 27 | 28 |
| 28 using content::NavigationController; | 29 using content::NavigationController; |
| 29 using content::OpenURLParams; | 30 using content::OpenURLParams; |
| 30 using content::Referrer; | 31 using content::Referrer; |
| 31 using content::WebContents; | 32 using content::WebContents; |
| 32 | 33 |
| 33 PageCycler::PageCycler(Browser* browser, | 34 PageCycler::PageCycler(Browser* browser, |
| 34 const base::FilePath& urls_file) | 35 const base::FilePath& urls_file) |
| 35 : content::WebContentsObserver( | 36 : content::WebContentsObserver( |
| 36 browser->tab_strip_model()->GetActiveWebContents()), | 37 browser->tab_strip_model()->GetActiveWebContents()), |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 aborted_ = true; | 259 aborted_ = true; |
| 259 error_.append(ASCIIToUTF16( | 260 error_.append(ASCIIToUTF16( |
| 260 "Browser was closed before the run was completed.")); | 261 "Browser was closed before the run was completed.")); |
| 261 DLOG(WARNING) << | 262 DLOG(WARNING) << |
| 262 "Page Cycler: browser was closed before the run was completed."; | 263 "Page Cycler: browser was closed before the run was completed."; |
| 263 content::BrowserThread::PostBlockingPoolTask( | 264 content::BrowserThread::PostBlockingPoolTask( |
| 264 FROM_HERE, | 265 FROM_HERE, |
| 265 base::Bind(&PageCycler::PrepareResultsOnBackgroundThread, this)); | 266 base::Bind(&PageCycler::PrepareResultsOnBackgroundThread, this)); |
| 266 } | 267 } |
| 267 } | 268 } |
| OLD | NEW |