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

Side by Side Diff: chrome/browser/importer/external_process_importer_bridge.h

Issue 18064002: The browser importer code which runs in the utility process should not depend on chrome\browser dat… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/importer/external_process_importer_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/importer/importer_bridge.h" 14 #include "chrome/browser/importer/importer_bridge.h"
14 15
15 class GURL; 16 class GURL;
16 struct ImportedBookmarkEntry; 17 struct ImportedBookmarkEntry;
17 18
18 namespace base { 19 namespace base {
19 class DictionaryValue; 20 class DictionaryValue;
20 class TaskRunner; 21 class TaskRunner;
21 } 22 }
22 23
24 namespace importer {
25 struct URLKeywordInfo;
26 }
27
23 namespace IPC { 28 namespace IPC {
24 class Message; 29 class Message;
25 class Sender; 30 class Sender;
26 } 31 }
27 32
28 // When the importer is run in an external process, the bridge is effectively 33 // When the importer is run in an external process, the bridge is effectively
29 // split in half by the IPC infrastructure. The external bridge receives data 34 // split in half by the IPC infrastructure. The external bridge receives data
30 // and notifications from the importer, and sends it across IPC. The 35 // and notifications from the importer, and sends it across IPC. The
31 // internal bridge gathers the data from the IPC host and writes it to the 36 // internal bridge gathers the data from the IPC host and writes it to the
32 // profile. 37 // profile.
(...skipping 15 matching lines...) Expand all
48 virtual void AddIE7PasswordInfo( 53 virtual void AddIE7PasswordInfo(
49 const IE7PasswordInfo& password_info) OVERRIDE; 54 const IE7PasswordInfo& password_info) OVERRIDE;
50 #endif 55 #endif
51 56
52 virtual void SetFavicons( 57 virtual void SetFavicons(
53 const std::vector<ImportedFaviconUsage>& favicons) OVERRIDE; 58 const std::vector<ImportedFaviconUsage>& favicons) OVERRIDE;
54 59
55 virtual void SetHistoryItems(const history::URLRows& rows, 60 virtual void SetHistoryItems(const history::URLRows& rows,
56 history::VisitSource visit_source) OVERRIDE; 61 history::VisitSource visit_source) OVERRIDE;
57 62
58 virtual void SetKeywords(const std::vector<TemplateURL*>& template_urls, 63 virtual void SetKeywords(
59 bool unique_on_host_and_path) OVERRIDE; 64 const std::vector<importer::URLKeywordInfo>& url_keywords,
65 bool unique_on_host_and_path) OVERRIDE;
66
67 virtual void SetFirefoxSearchEnginesXMLData(
68 const std::vector<std::string>& seach_engine_data) OVERRIDE;
60 69
61 virtual void SetPasswordForm( 70 virtual void SetPasswordForm(
62 const content::PasswordForm& form) OVERRIDE; 71 const content::PasswordForm& form) OVERRIDE;
63 72
64 virtual void NotifyStarted() OVERRIDE; 73 virtual void NotifyStarted() OVERRIDE;
65 virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE; 74 virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE;
66 virtual void NotifyItemEnded(importer::ImportItem item) OVERRIDE; 75 virtual void NotifyItemEnded(importer::ImportItem item) OVERRIDE;
67 virtual void NotifyEnded() OVERRIDE; 76 virtual void NotifyEnded() OVERRIDE;
68 77
69 virtual string16 GetLocalizedString(int message_id) OVERRIDE; 78 virtual string16 GetLocalizedString(int message_id) OVERRIDE;
70 // End ImporterBridge implementation. 79 // End ImporterBridge implementation.
71 80
72 private: 81 private:
73 virtual ~ExternalProcessImporterBridge(); 82 virtual ~ExternalProcessImporterBridge();
74 83
75 void Send(IPC::Message* message); 84 void Send(IPC::Message* message);
76 void SendInternal(IPC::Message* message); 85 void SendInternal(IPC::Message* message);
77 86
78 // Holds strings needed by the external importer because the resource 87 // Holds strings needed by the external importer because the resource
79 // bundle isn't available to the external process. 88 // bundle isn't available to the external process.
80 scoped_ptr<base::DictionaryValue> localized_strings_; 89 scoped_ptr<base::DictionaryValue> localized_strings_;
81 90
82 IPC::Sender* sender_; 91 IPC::Sender* sender_;
83 scoped_refptr<base::TaskRunner> task_runner_; 92 scoped_refptr<base::TaskRunner> task_runner_;
84 93
85 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge); 94 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge);
86 }; 95 };
87 96
88 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_ 97 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/importer/external_process_importer_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698