Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/ui/webui/device_log_ui.cc

Issue 941063003: Log device/usb messages to chrome://device-log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and adjust log levels. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/device_log_ui.h" 5 #include "chrome/browser/ui/webui/device_log_ui.h"
6 6
7 #include <string> 7 #include <string>
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 html->AddLocalizedString("logLevelUserText", IDS_DEVICE_LOG_LEVEL_USER); 64 html->AddLocalizedString("logLevelUserText", IDS_DEVICE_LOG_LEVEL_USER);
65 html->AddLocalizedString("logLevelEventText", IDS_DEVICE_LOG_LEVEL_EVENT); 65 html->AddLocalizedString("logLevelEventText", IDS_DEVICE_LOG_LEVEL_EVENT);
66 html->AddLocalizedString("logLevelDebugText", IDS_DEVICE_LOG_LEVEL_DEBUG); 66 html->AddLocalizedString("logLevelDebugText", IDS_DEVICE_LOG_LEVEL_DEBUG);
67 html->AddLocalizedString("logLevelFileinfoText", IDS_DEVICE_LOG_FILEINFO); 67 html->AddLocalizedString("logLevelFileinfoText", IDS_DEVICE_LOG_FILEINFO);
68 html->AddLocalizedString("logLevelTimeDetailText", 68 html->AddLocalizedString("logLevelTimeDetailText",
69 IDS_DEVICE_LOG_TIME_DETAIL); 69 IDS_DEVICE_LOG_TIME_DETAIL);
70 70
71 html->AddLocalizedString("logTypeLoginText", IDS_DEVICE_LOG_TYPE_LOGIN); 71 html->AddLocalizedString("logTypeLoginText", IDS_DEVICE_LOG_TYPE_LOGIN);
72 html->AddLocalizedString("logTypeNetworkText", IDS_DEVICE_LOG_TYPE_NETWORK); 72 html->AddLocalizedString("logTypeNetworkText", IDS_DEVICE_LOG_TYPE_NETWORK);
73 html->AddLocalizedString("logTypePowerText", IDS_DEVICE_LOG_TYPE_POWER); 73 html->AddLocalizedString("logTypePowerText", IDS_DEVICE_LOG_TYPE_POWER);
74 html->AddLocalizedString("logTypeUsbText", IDS_DEVICE_LOG_TYPE_USB);
74 75
75 html->AddLocalizedString("logEntryFormat", IDS_DEVICE_LOG_ENTRY); 76 html->AddLocalizedString("logEntryFormat", IDS_DEVICE_LOG_ENTRY);
76 html->SetJsonPath("strings.js"); 77 html->SetJsonPath("strings.js");
77 html->AddResourcePath("device_log_ui.css", IDR_DEVICE_LOG_UI_CSS); 78 html->AddResourcePath("device_log_ui.css", IDR_DEVICE_LOG_UI_CSS);
78 html->AddResourcePath("device_log_ui.js", IDR_DEVICE_LOG_UI_JS); 79 html->AddResourcePath("device_log_ui.js", IDR_DEVICE_LOG_UI_JS);
79 html->SetDefaultResource(IDR_DEVICE_LOG_UI_HTML); 80 html->SetDefaultResource(IDR_DEVICE_LOG_UI_HTML);
80 81
81 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 82 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
82 html); 83 html);
83 } 84 }
84 85
85 DeviceLogUI::~DeviceLogUI() { 86 DeviceLogUI::~DeviceLogUI() {
86 } 87 }
87 88
88 } // namespace chromeos 89 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698