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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 std::string sys_info_checkbox; | 535 std::string sys_info_checkbox; |
536 (*i)->GetAsString(&sys_info_checkbox); | 536 (*i)->GetAsString(&sys_info_checkbox); |
537 bool send_sys_info = (sys_info_checkbox == "true"); | 537 bool send_sys_info = (sys_info_checkbox == "true"); |
538 | 538 |
539 // If we aren't sending the sys_info, cancel the gathering of the syslogs. | 539 // If we aren't sending the sys_info, cancel the gathering of the syslogs. |
540 if (!send_sys_info) | 540 if (!send_sys_info) |
541 CancelFeedbackCollection(); | 541 CancelFeedbackCollection(); |
542 #endif | 542 #endif |
543 | 543 |
544 // Update the data in bug_report_data_ so it can be sent | 544 // Update the data in bug_report_data_ so it can be sent |
545 bug_report_data_->UpdateData(web_ui_->GetProfile() | 545 bug_report_data_->UpdateData(Profile::FromWebUI(web_ui_) |
546 , target_tab_url_ | 546 , target_tab_url_ |
547 , problem_type | 547 , problem_type |
548 , page_url | 548 , page_url |
549 , description | 549 , description |
550 , image | 550 , image |
551 #if defined(OS_CHROMEOS) | 551 #if defined(OS_CHROMEOS) |
552 , user_email | 552 , user_email |
553 , send_sys_info | 553 , send_sys_info |
554 , false // sent_report | 554 , false // sent_report |
555 #endif | 555 #endif |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 AddMessageHandler((handler)->Attach(this)); | 618 AddMessageHandler((handler)->Attach(this)); |
619 | 619 |
620 // The handler's init will determine whether we show the error html page. | 620 // The handler's init will determine whether we show the error html page. |
621 ChromeWebUIDataSource* html_source = | 621 ChromeWebUIDataSource* html_source = |
622 CreateBugReportUIHTMLSource(handler->Init()); | 622 CreateBugReportUIHTMLSource(handler->Init()); |
623 | 623 |
624 // Set up the chrome://bugreport/ source. | 624 // Set up the chrome://bugreport/ source. |
625 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); | 625 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); |
626 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 626 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
627 } | 627 } |
OLD | NEW |