| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/bug_report_util.h" | 5 #include "chrome/browser/bug_report_util.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_version_info.h" | |
| 11 #include "chrome/browser/browser_process_impl.h" | 10 #include "chrome/browser/browser_process_impl.h" |
| 12 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
| 13 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 12 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
| 14 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
| 14 #include "chrome/common/chrome_version_info.h" |
| 15 #include "chrome/common/net/url_fetcher.h" | 15 #include "chrome/common/net/url_fetcher.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "grit/locale_settings.h" | 17 #include "grit/locale_settings.h" |
| 18 #include "net/url_request/url_request_status.h" | 18 #include "net/url_request/url_request_status.h" |
| 19 #include "unicode/locid.h" | 19 #include "unicode/locid.h" |
| 20 | 20 |
| 21 #include <string> | 21 #include <string> |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Add the language | 173 // Add the language |
| 174 std::string chrome_locale = g_browser_process->GetApplicationLocale(); | 174 std::string chrome_locale = g_browser_process->GetApplicationLocale(); |
| 175 common_data->set_source_descripton_language(chrome_locale); | 175 common_data->set_source_descripton_language(chrome_locale); |
| 176 | 176 |
| 177 // Set the url | 177 // Set the url |
| 178 web_data->set_url(page_url_text); | 178 web_data->set_url(page_url_text); |
| 179 | 179 |
| 180 // Add the Chrome version | 180 // Add the Chrome version |
| 181 std::string chrome_version; | 181 std::string chrome_version; |
| 182 scoped_ptr<FileVersionInfo> version_info( | 182 scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); |
| 183 chrome_app::GetChromeVersionInfo()); | |
| 184 if (version_info.get()) { | 183 if (version_info.get()) { |
| 185 chrome_version = WideToUTF8(version_info->product_name()) + " - " + | 184 chrome_version = WideToUTF8(version_info->product_name()) + " - " + |
| 186 WideToUTF8(version_info->file_version()) + | 185 WideToUTF8(version_info->file_version()) + |
| 187 " (" + WideToUTF8(version_info->last_change()) + ")"; | 186 " (" + WideToUTF8(version_info->last_change()) + ")"; |
| 188 } | 187 } |
| 189 | 188 |
| 190 if (!chrome_version.empty()) | 189 if (!chrome_version.empty()) |
| 191 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), | 190 AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), |
| 192 chrome_version); | 191 chrome_version); |
| 193 | 192 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 231 |
| 233 // static | 232 // static |
| 234 void BugReportUtil::ReportPhishing(TabContents* currentTab, | 233 void BugReportUtil::ReportPhishing(TabContents* currentTab, |
| 235 const std::string& phishing_url) { | 234 const std::string& phishing_url) { |
| 236 currentTab->controller().LoadURL( | 235 currentTab->controller().LoadURL( |
| 237 safe_browsing_util::GeneratePhishingReportUrl( | 236 safe_browsing_util::GeneratePhishingReportUrl( |
| 238 kReportPhishingUrl, phishing_url), | 237 kReportPhishingUrl, phishing_url), |
| 239 GURL(), | 238 GURL(), |
| 240 PageTransition::LINK); | 239 PageTransition::LINK); |
| 241 } | 240 } |
| OLD | NEW |