OLD | NEW |
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/ui/webui/bug_report_ui.h" | 5 #include "chrome/browser/ui/webui/bug_report_ui.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
38 #include "base/file_util.h" | 38 #include "base/file_util.h" |
39 #include "base/path_service.h" | 39 #include "base/path_service.h" |
40 #include "base/synchronization/waitable_event.h" | 40 #include "base/synchronization/waitable_event.h" |
41 #include "chrome/browser/chromeos/cros/cros_library.h" | 41 #include "chrome/browser/chromeos/cros/cros_library.h" |
42 #include "chrome/browser/chromeos/login/user_manager.h" | 42 #include "chrome/browser/chromeos/login/user_manager.h" |
43 #include "chrome/browser/chromeos/system/syslogs_provider.h" | 43 #include "chrome/browser/chromeos/system/syslogs_provider.h" |
44 #endif | 44 #endif |
45 | 45 |
| 46 using content::BrowserThread; |
| 47 |
46 namespace { | 48 namespace { |
47 | 49 |
48 const char kScreenshotBaseUrl[] = "chrome://screenshots/"; | 50 const char kScreenshotBaseUrl[] = "chrome://screenshots/"; |
49 const char kCurrentScreenshotUrl[] = "chrome://screenshots/current"; | 51 const char kCurrentScreenshotUrl[] = "chrome://screenshots/current"; |
50 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
51 const char kSavedScreenshotsUrl[] = "chrome://screenshots/saved/"; | 53 const char kSavedScreenshotsUrl[] = "chrome://screenshots/saved/"; |
52 const char kScreenshotPattern[] = "screenshot-*.png"; | 54 const char kScreenshotPattern[] = "screenshot-*.png"; |
53 | 55 |
54 const size_t kMaxSavedScreenshots = 2; | 56 const size_t kMaxSavedScreenshots = 2; |
55 #endif | 57 #endif |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 AddMessageHandler((handler)->Attach(this)); | 617 AddMessageHandler((handler)->Attach(this)); |
616 | 618 |
617 // The handler's init will determine whether we show the error html page. | 619 // The handler's init will determine whether we show the error html page. |
618 ChromeWebUIDataSource* html_source = | 620 ChromeWebUIDataSource* html_source = |
619 CreateBugReportUIHTMLSource(handler->Init()); | 621 CreateBugReportUIHTMLSource(handler->Init()); |
620 | 622 |
621 // Set up the chrome://bugreport/ source. | 623 // Set up the chrome://bugreport/ source. |
622 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); | 624 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); |
623 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 625 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
624 } | 626 } |
OLD | NEW |