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

Unified Diff: chrome/browser/ui/webui/device_log_ui.cc

Issue 919183002: Move chromeos::device_event_log into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shut down in PostDestroyThreads. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/device_log_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/device_log_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/device_log_ui.cc b/chrome/browser/ui/webui/device_log_ui.cc
similarity index 84%
rename from chrome/browser/ui/webui/chromeos/device_log_ui.cc
rename to chrome/browser/ui/webui/device_log_ui.cc
index cfd47e37d5e295d6d9a657b54142b1ae4a4fe01f..6231da6ccb9567c7591934c10cd6e1757ae59043 100644
--- a/chrome/browser/ui/webui/chromeos/device_log_ui.cc
+++ b/chrome/browser/ui/webui/device_log_ui.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/webui/chromeos/device_log_ui.h"
+#include "chrome/browser/ui/webui/device_log_ui.h"
#include <string>
@@ -10,8 +10,9 @@
#include "base/bind_helpers.h"
#include "base/values.h"
#include "chrome/common/url_constants.h"
+#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
-#include "chromeos/device_event_log.h"
+#include "components/device_event_log/device_event_log.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
@@ -31,15 +32,14 @@ class DeviceLogMessageHandler : public content::WebUIMessageHandler {
void RegisterMessages() override {
web_ui()->RegisterMessageCallback(
"DeviceLog.getLog",
- base::Bind(&DeviceLogMessageHandler::GetLog,
- base::Unretained(this)));
+ base::Bind(&DeviceLogMessageHandler::GetLog, base::Unretained(this)));
}
private:
void GetLog(const base::ListValue* value) const {
- base::StringValue data(chromeos::device_event_log::GetAsString(
- chromeos::device_event_log::NEWEST_FIRST, "json", "",
- chromeos::device_event_log::LOG_LEVEL_DEBUG, 0));
+ base::StringValue data(device_event_log::GetAsString(
+ device_event_log::NEWEST_FIRST, "json", "",
+ device_event_log::LOG_LEVEL_DEBUG, 0));
web_ui()->CallJavascriptFunction("DeviceLogUI.getLogCallback", data);
}
@@ -78,8 +78,8 @@ DeviceLogUI::DeviceLogUI(content::WebUI* web_ui)
html->AddResourcePath("device_log_ui.js", IDR_DEVICE_LOG_UI_JS);
html->SetDefaultResource(IDR_DEVICE_LOG_UI_HTML);
- content::WebUIDataSource::Add(
- web_ui->GetWebContents()->GetBrowserContext(), html);
+ content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
+ html);
}
DeviceLogUI::~DeviceLogUI() {
« no previous file with comments | « chrome/browser/ui/webui/device_log_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698