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/dom_ui/conflicts_ui.h" | 5 #include "chrome/browser/dom_ui/conflicts_ui.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
17 #include "chrome/browser/enumerate_modules_model_win.h" | 17 #include "chrome/browser/enumerate_modules_model_win.h" |
| 18 #include "chrome/browser/metrics/user_metrics.h" |
| 19 #include "chrome/browser/tab_contents/tab_contents.h" |
18 #include "chrome/common/jstemplate_builder.h" | 20 #include "chrome/common/jstemplate_builder.h" |
19 #include "chrome/common/notification_observer.h" | 21 #include "chrome/common/notification_observer.h" |
20 #include "chrome/common/notification_registrar.h" | 22 #include "chrome/common/notification_registrar.h" |
21 #include "chrome/common/notification_service.h" | 23 #include "chrome/common/notification_service.h" |
22 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
23 #include "grit/browser_resources.h" | 25 #include "grit/browser_resources.h" |
24 #include "grit/chromium_strings.h" | 26 #include "grit/chromium_strings.h" |
25 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
26 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
27 | 29 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 187 |
186 } // namespace | 188 } // namespace |
187 | 189 |
188 /////////////////////////////////////////////////////////////////////////////// | 190 /////////////////////////////////////////////////////////////////////////////// |
189 // | 191 // |
190 // ConflictsUI | 192 // ConflictsUI |
191 // | 193 // |
192 /////////////////////////////////////////////////////////////////////////////// | 194 /////////////////////////////////////////////////////////////////////////////// |
193 | 195 |
194 ConflictsUI::ConflictsUI(TabContents* contents) : DOMUI(contents) { | 196 ConflictsUI::ConflictsUI(TabContents* contents) : DOMUI(contents) { |
| 197 UserMetrics::RecordAction( |
| 198 UserMetricsAction("ViewAboutConflicts"), contents->profile()); |
| 199 |
195 AddMessageHandler((new ConflictsDOMHandler())->Attach(this)); | 200 AddMessageHandler((new ConflictsDOMHandler())->Attach(this)); |
196 | 201 |
197 ConflictsUIHTMLSource* html_source = new ConflictsUIHTMLSource(); | 202 ConflictsUIHTMLSource* html_source = new ConflictsUIHTMLSource(); |
198 | 203 |
199 // Set up the about:conflicts source. | 204 // Set up the about:conflicts source. |
200 BrowserThread::PostTask( | 205 BrowserThread::PostTask( |
201 BrowserThread::IO, FROM_HERE, | 206 BrowserThread::IO, FROM_HERE, |
202 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), | 207 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), |
203 &ChromeURLDataManager::AddDataSource, | 208 &ChromeURLDataManager::AddDataSource, |
204 make_scoped_refptr(html_source))); | 209 make_scoped_refptr(html_source))); |
205 } | 210 } |
206 | 211 |
207 // static | 212 // static |
208 RefCountedMemory* ConflictsUI::GetFaviconResourceBytes() { | 213 RefCountedMemory* ConflictsUI::GetFaviconResourceBytes() { |
209 return ResourceBundle::GetSharedInstance(). | 214 return ResourceBundle::GetSharedInstance(). |
210 LoadDataResourceBytes(IDR_CONFLICT_FAVICON); | 215 LoadDataResourceBytes(IDR_CONFLICT_FAVICON); |
211 } | 216 } |
212 | 217 |
213 #endif | 218 #endif |
OLD | NEW |