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/views/bug_report_view.h" | 5 #include "chrome/browser/views/bug_report_view.h" |
6 | 6 |
7 #include "app/combobox_model.h" | 7 #include "app/combobox_model.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/app/chrome_version_info.h" |
11 #include "chrome/browser/bug_report_util.h" | 12 #include "chrome/browser/bug_report_util.h" |
12 #include "chrome/browser/net/url_fetcher.h" | 13 #include "chrome/browser/net/url_fetcher.h" |
13 #include "chrome/browser/pref_service.h" | 14 #include "chrome/browser/pref_service.h" |
14 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
15 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 16 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
16 #include "chrome/browser/tab_contents/navigation_controller.h" | 17 #include "chrome/browser/tab_contents/navigation_controller.h" |
17 #include "chrome/browser/tab_contents/navigation_entry.h" | 18 #include "chrome/browser/tab_contents/navigation_entry.h" |
18 #include "chrome/browser/tab_contents/tab_contents.h" | 19 #include "chrome/browser/tab_contents/tab_contents.h" |
19 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
20 #include "grit/chromium_strings.h" | 21 #include "grit/chromium_strings.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 130 |
130 // We want to use the URL of the current committed entry (the current URL may | 131 // We want to use the URL of the current committed entry (the current URL may |
131 // actually be the pending one). | 132 // actually be the pending one). |
132 if (tab->controller().GetActiveEntry()) { | 133 if (tab->controller().GetActiveEntry()) { |
133 page_url_text_->SetText(UTF8ToUTF16( | 134 page_url_text_->SetText(UTF8ToUTF16( |
134 tab->controller().GetActiveEntry()->url().spec())); | 135 tab->controller().GetActiveEntry()->url().spec())); |
135 } | 136 } |
136 | 137 |
137 // Retrieve the application version info. | 138 // Retrieve the application version info. |
138 scoped_ptr<FileVersionInfo> version_info( | 139 scoped_ptr<FileVersionInfo> version_info( |
139 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 140 chrome_app::GetChromeVersionInfo()); |
140 if (version_info.get()) { | 141 if (version_info.get()) { |
141 version_ = version_info->product_name() + L" - " + | 142 version_ = version_info->product_name() + L" - " + |
142 version_info->file_version() + | 143 version_info->file_version() + |
143 L" (" + version_info->last_change() + L")"; | 144 L" (" + version_info->last_change() + L")"; |
144 } | 145 } |
145 } | 146 } |
146 | 147 |
147 BugReportView::~BugReportView() { | 148 BugReportView::~BugReportView() { |
148 } | 149 } |
149 | 150 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 include_page_image_checkbox_->checked() && png_data_.get() ? | 337 include_page_image_checkbox_->checked() && png_data_.get() ? |
337 reinterpret_cast<const char *>(&((*png_data_.get())[0])) : NULL, | 338 reinterpret_cast<const char *>(&((*png_data_.get())[0])) : NULL, |
338 png_data_->size()); | 339 png_data_->size()); |
339 } | 340 } |
340 return true; | 341 return true; |
341 } | 342 } |
342 | 343 |
343 views::View* BugReportView::GetContentsView() { | 344 views::View* BugReportView::GetContentsView() { |
344 return this; | 345 return this; |
345 } | 346 } |
OLD | NEW |