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

Unified Diff: chrome/browser/extensions/api/serial/serial_port_enumerator.h

Issue 158063002: Use udev for serial device enumeration on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -___- Created 6 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
Index: chrome/browser/extensions/api/serial/serial_port_enumerator.h
diff --git a/chrome/browser/extensions/api/serial/serial_port_enumerator.h b/chrome/browser/extensions/api/serial/serial_port_enumerator.h
deleted file mode 100644
index b00691908fc99a1b46bdf6630ab0cc742ce5ba90..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/serial/serial_port_enumerator.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 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_SERIAL_SERIAL_PORT_ENUMERATOR_H_
-#define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_PORT_ENUMERATOR_H_
-
-#include <set>
-#include <string>
-
-#include "base/gtest_prod_util.h"
-
-FORWARD_DECLARE_TEST(SerialPortEnumeratorTest, ValidPortNamePatterns);
-FORWARD_DECLARE_TEST(SerialPortEnumeratorTest, InvalidPortNamePatterns);
-
-namespace extensions {
-
-class APIResourceEventNotifier;
-
-// Discovers and enumerates likely serial ports on the current machine.
-class SerialPortEnumerator {
- public:
- typedef std::set<std::string> StringSet;
-
- // Returns true if the given port name (e.g., "/dev/tty.usbmodemXXX") is in
- // the supplied set of names of serial ports that exist on this machine.
- static bool DoesPortExist(const StringSet& name_set,
- const std::string& port_name);
-
- static StringSet GenerateValidSerialPortNames();
-
- private:
- // Returns a StringSet of patterns to be used with MatchPattern.
- static StringSet GenerateValidPatterns();
-
- FRIEND_TEST_ALL_PREFIXES(::SerialPortEnumeratorTest, ValidPortNamePatterns);
- FRIEND_TEST_ALL_PREFIXES(::SerialPortEnumeratorTest, InvalidPortNamePatterns);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_PORT_ENUMERATOR_H_

Powered by Google App Engine
This is Rietveld 408576698