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/proxy/chrome_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: everything works Created 9 years, 1 month 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_PROXY_CHROME_KEYRING_PROXY_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PROXY_CHROME_KEYRING_PROXY_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/password_manager/proxy/keyring_loader.h"
11 #include "chrome/browser/password_manager/proxy/message_reader.h"
12
13 // Forward declarations of GLib stuff.
14 typedef struct _GMainLoop GMainLoop;
15 typedef struct _GSource GSource;
16
17 class MessageProcessor;
18
19 // This class just contains constants used as command characters in the wire
20 // protocol for communicating with the keyring proxy.
21 class ChromeKeyringProxyCommands {
22 public:
23 static const char kAddLogin = 'A';
24 static const char kRemoveLogin = 'R';
25 static const char kAddLoginSearch = 'a';
26 static const char kUpdateLoginSearch = 'u';
27 static const char kGetLogins = 'g';
28 static const char kGetLoginsList = 'l';
29 static const char kGetAllLogins = '*';
30 };
31
32 class ChromeKeyringProxy : public GnomeKeyringLoader {
33 public:
34 ChromeKeyringProxy(int fd, FILE* output);
35
36 ~ChromeKeyringProxy();
37
38 bool Init();
39 void Run();
40 void Stop();
41
42 private:
43 void ReadData();
44
45 static gboolean DataReady(gpointer data);
46
47 int fd_;
48 GMainLoop* main_loop_;
49 GSource* input_;
50 MessageReader reader_;
51 scoped_ptr<MessageProcessor> processor_;
52 };
53
54 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PROXY_CHROME_KEYRING_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698