Index: chrome/browser/password_manager/proxy/chrome_keyring_proxy.h |
=================================================================== |
--- chrome/browser/password_manager/proxy/chrome_keyring_proxy.h (revision 0) |
+++ chrome/browser/password_manager/proxy/chrome_keyring_proxy.h (revision 0) |
@@ -0,0 +1,54 @@ |
+// Copyright (c) 2011 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_PASSWORD_MANAGER_PROXY_CHROME_KEYRING_PROXY_H_ |
+#define CHROME_BROWSER_PASSWORD_MANAGER_PROXY_CHROME_KEYRING_PROXY_H_ |
+#pragma once |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/password_manager/proxy/keyring_loader.h" |
+#include "chrome/browser/password_manager/proxy/message_reader.h" |
+ |
+// Forward declarations of GLib stuff. |
+typedef struct _GMainLoop GMainLoop; |
+typedef struct _GSource GSource; |
+ |
+class MessageProcessor; |
+ |
+// This class just contains constants used as command characters in the wire |
+// protocol for communicating with the keyring proxy. |
+class ChromeKeyringProxyCommands { |
+ public: |
+ static const char kAddLogin = 'A'; |
+ static const char kRemoveLogin = 'R'; |
+ static const char kAddLoginSearch = 'a'; |
+ static const char kUpdateLoginSearch = 'u'; |
+ static const char kGetLogins = 'g'; |
+ static const char kGetLoginsList = 'l'; |
+ static const char kGetAllLogins = '*'; |
+}; |
+ |
+class ChromeKeyringProxy : public GnomeKeyringLoader { |
+ public: |
+ ChromeKeyringProxy(int fd, FILE* output); |
+ |
+ ~ChromeKeyringProxy(); |
+ |
+ bool Init(); |
+ void Run(); |
+ void Stop(); |
+ |
+ private: |
+ void ReadData(); |
+ |
+ static gboolean DataReady(gpointer data); |
+ |
+ int fd_; |
+ GMainLoop* main_loop_; |
+ GSource* input_; |
+ MessageReader reader_; |
+ scoped_ptr<MessageProcessor> processor_; |
+}; |
+ |
+#endif // CHROME_BROWSER_PASSWORD_MANAGER_PROXY_CHROME_KEYRING_PROXY_H_ |
Property changes on: chrome/browser/password_manager/proxy/chrome_keyring_proxy.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |