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

Side by Side Diff: chrome/browser/password_manager/keyring_proxy/keyring_proxy.h

Issue 8509038: Linux: split GNOME Keyring integration into a separate process. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: merge Created 8 years, 11 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_KEYRING_PROXY_KEYRING_PROXY_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_KEYRING_PROXY_KEYRING_PROXY_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/password_manager/keyring_proxy/gnome_keyring_loader.h"
11 #include "chrome/browser/password_manager/keyring_proxy/message_reader.h"
12
13 // Forward declarations of GLib stuff.
14 typedef struct _GMainLoop GMainLoop;
15 typedef struct _GSource GSource;
16
17 namespace keyring_proxy {
18
19 class MessageProcessor;
20
21 class KeyringProxy : public GnomeKeyringLoader {
22 public:
23 // These are the command characters in the wire protocol for communicating
24 // with the keyring proxy.
25 static const char kAddLoginCommand = 'A';
26 static const char kRemoveLoginCommand = 'R';
27 static const char kAddLoginSearchCommand = 'a';
28 static const char kUpdateLoginSearchCommand = 'u';
29 static const char kGetLoginsCommand = 'g';
30 static const char kGetLoginsListCommand = 'l';
31 static const char kGetAllLoginsCommand = '*';
32
33 KeyringProxy(int fd, FILE* output);
34
35 ~KeyringProxy();
36
37 bool Init();
38 void Run();
39 void Stop();
40
41 private:
42 void ReadData();
43
44 static gboolean DataReady(gpointer data);
45
46 int fd_;
47 GMainLoop* main_loop_;
48 GSource* input_;
49 MessageReader reader_;
50 scoped_ptr<MessageProcessor> processor_;
51 };
52
53 } // namespace keyring_proxy
54
55 #endif // CHROME_BROWSER_PASSWORD_MANAGER_KEYRING_PROXY_KEYRING_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698