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

Side by Side Diff: chrome/browser/importer/external_process_importer_client.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
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_CLIENT_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_
6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/files/file_path.h"
gab 2013/06/27 22:07:29 Why add this include?
ananta 2013/06/27 22:29:55 Artifact from a previous patch iteration. Gone
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "chrome/browser/history/history_types.h" 16 #include "chrome/browser/history/history_types.h"
16 #include "chrome/browser/importer/importer_data_types.h" 17 #include "chrome/browser/importer/importer_data_types.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/utility_process_host_client.h" 19 #include "content/public/browser/utility_process_host_client.h"
19 20
20 class ExternalProcessImporterHost; 21 class ExternalProcessImporterHost;
21 struct ImportedBookmarkEntry; 22 struct ImportedBookmarkEntry;
22 struct ImportedFaviconUsage; 23 struct ImportedFaviconUsage;
23 class InProcessImporterBridge; 24 class InProcessImporterBridge;
24 class TemplateURL; 25 class TemplateURL;
gab 2013/06/27 22:07:29 Remove fwd-decl
ananta 2013/06/27 22:29:55 Done.
25 26
26 namespace content { 27 namespace content {
27 struct PasswordForm; 28 struct PasswordForm;
28 class UtilityProcessHost; 29 class UtilityProcessHost;
29 } 30 }
30 31
31 // This class is the client for the out of process profile importing. It 32 // This class is the client for the out of process profile importing. It
32 // collects notifications from this process host and feeds data back to the 33 // collects notifications from this process host and feeds data back to the
33 // importer host, who actually does the writing. 34 // importer host, who actually does the writing.
34 class ExternalProcessImporterClient : public content::UtilityProcessHostClient { 35 class ExternalProcessImporterClient : public content::UtilityProcessHostClient {
(...skipping 23 matching lines...) Expand all
58 int visit_source); 59 int visit_source);
59 void OnHomePageImportReady(const GURL& home_page); 60 void OnHomePageImportReady(const GURL& home_page);
60 void OnBookmarksImportStart(const string16& first_folder_name, 61 void OnBookmarksImportStart(const string16& first_folder_name,
61 size_t total_bookmarks_count); 62 size_t total_bookmarks_count);
62 void OnBookmarksImportGroup( 63 void OnBookmarksImportGroup(
63 const std::vector<ImportedBookmarkEntry>& bookmarks_group); 64 const std::vector<ImportedBookmarkEntry>& bookmarks_group);
64 void OnFaviconsImportStart(size_t total_favicons_count); 65 void OnFaviconsImportStart(size_t total_favicons_count);
65 void OnFaviconsImportGroup( 66 void OnFaviconsImportGroup(
66 const std::vector<ImportedFaviconUsage>& favicons_group); 67 const std::vector<ImportedFaviconUsage>& favicons_group);
67 void OnPasswordFormImportReady(const content::PasswordForm& form); 68 void OnPasswordFormImportReady(const content::PasswordForm& form);
68 // WARNING: This function takes ownership of (and deletes) the pointers in 69 void OnKeywordsImportReady(
69 // |template_urls|! 70 const std::vector<importer::URLKeywordInfo>& url_keywords,
gab 2013/06/27 22:07:29 Fwd-decl URLKeywordInfo.
ananta 2013/06/27 22:29:55 Done.
70 void OnKeywordsImportReady(const std::vector<TemplateURL*>& template_urls, 71 bool unique_on_host_and_path);
71 bool unique_on_host_and_path); 72 void OnFirefoxSearchEngineDataReceived(
73 const std::vector<std::string> search_engine_data);
72 74
73 protected: 75 protected:
74 virtual ~ExternalProcessImporterClient(); 76 virtual ~ExternalProcessImporterClient();
75 77
76 private: 78 private:
77 // Notifies the importerhost that import has finished, and calls Release(). 79 // Notifies the importerhost that import has finished, and calls Release().
78 void Cleanup(); 80 void Cleanup();
79 81
80 // Cancel import process on IO thread. 82 // Cancel import process on IO thread.
81 void CancelImportProcessOnIOThread(); 83 void CancelImportProcessOnIOThread();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // ProfileWriter. 126 // ProfileWriter.
125 scoped_refptr<InProcessImporterBridge> bridge_; 127 scoped_refptr<InProcessImporterBridge> bridge_;
126 128
127 // True if import process has been cancelled. 129 // True if import process has been cancelled.
128 bool cancelled_; 130 bool cancelled_;
129 131
130 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); 132 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient);
131 }; 133 };
132 134
133 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ 135 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698