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

Side by Side Diff: chrome/utility/profile_import_handler.h

Issue 10777012: Disable uses of ProfileImportProcess on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Yaron's comments Created 8 years, 5 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_UTILITY_PROFILE_IMPORT_HANDLER_H_
6 #define CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ipc/ipc_listener.h"
12
13 class ExternalProcessImporterBridge;
14 class Importer;
15
16 namespace base {
17 class DictionaryValue;
18 class Thread;
19 }
20
21 namespace importer {
22 struct SourceProfile;
23 }
24
25 namespace IPC {
26 class Message;
27 }
28
29 namespace chrome {
30
31 class ProfileImportHandler : public IPC::Listener {
Yaron 2012/07/18 15:30:39 Brief class comment
Philippe 2012/07/18 16:01:17 Done.
32 public:
33 ProfileImportHandler();
34 ~ProfileImportHandler();
35
36 // IPC::Listener:
37 virtual bool OnMessageReceived(const IPC::Message& message);
38
39 private:
40 void OnImportStart(
41 const importer::SourceProfile& source_profile,
42 uint16 items,
43 const base::DictionaryValue& localized_strings);
44
45 void OnImportCancel() {
46 ImporterCleanup();
Yaron 2012/07/18 15:30:39 move to cc file
Philippe 2012/07/18 16:01:17 Done.
47 }
48
49 // The following are used with out of process profile import:
50 void ImporterCleanup();
51
52 void OnImportItemFinished(uint16 item);
53
54 static bool Send(IPC::Message* message);
55
56 // Thread that importer runs on, while ProfileImportThread handles messages
57 // from the browser process.
58 scoped_ptr<base::Thread> import_thread_;
59
60 // Bridge object is passed to importer, so that it can send IPC calls
61 // directly back to the ProfileImportProcessHost.
62 scoped_refptr<ExternalProcessImporterBridge> bridge_;
63
64 // A bitmask of importer::ImportItem.
65 uint16 items_to_import_;
66
67 // Importer of the appropriate type (Firefox, Safari, IE, etc.)
68 scoped_refptr<Importer> importer_;
69 };
70
71 } // namespace chrome
72
73 #endif // CHROME_UTILITY_PROFILE_IMPORT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698