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

Unified Diff: chrome/browser/extensions/api/log_private/filter_handler.h

Issue 2934163002: Delete the logPrivate APIs (Closed)
Patch Set: Roll back docs changes Created 3 years, 6 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/extensions/BUILD.gn ('k') | chrome/browser/extensions/api/log_private/filter_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/log_private/filter_handler.h
diff --git a/chrome/browser/extensions/api/log_private/filter_handler.h b/chrome/browser/extensions/api/log_private/filter_handler.h
deleted file mode 100644
index 73629a3161eda9e2c67cffcf3abef0de0606aa43..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/log_private/filter_handler.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_FILTER_HANDLER_H_
-#define CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_FILTER_HANDLER_H_
-
-#include <string>
-#include <vector>
-
-#include "base/macros.h"
-#include "chrome/common/extensions/api/log_private.h"
-
-namespace extensions {
-// This class contains multiple filtering methods to filter log entries
-// by multiple fields.
-class FilterHandler {
- public:
- explicit FilterHandler(const api::log_private::Filter& filter);
- ~FilterHandler();
-
- // This function decides if a log entry should be returned to user.
- // Returns true if the log entry meets the filtering conditions.
- bool IsValidLogEntry(const api::log_private::LogEntry& entry) const;
- // Filters log by timestamp.
- // Returns true if the timestamp is within the time range of the filter.
- bool IsValidTime(double time) const;
- // Filters log by source (syslog, network_event_log, etc).
- // Returns true if the log is from specified source in the filter.
- bool IsValidSource(const std::string& source) const;
- // Filters log by level (DEBUG, ERROR, WARNING).
- // Returns true if the log level is specified in the filter.
- bool IsValidLevel(const std::string& level) const;
- // Filters log by its process name.
- // Returns true if the process name is specified in the filter.
- bool IsValidProcess(const std::string& process) const;
-
- const api::log_private::Filter* GetFilter() const { return &filter_; }
-
- private:
- api::log_private::Filter filter_;
-
- DISALLOW_COPY_AND_ASSIGN(FilterHandler);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_FILTER_HANDLER_H_
« no previous file with comments | « chrome/browser/extensions/BUILD.gn ('k') | chrome/browser/extensions/api/log_private/filter_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698