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

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

Issue 18501013: Move most importer code to chrome/utility/importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another gyp attempt 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 | « chrome/browser/importer/ie_importer_utils_win.cc ('k') | chrome/browser/importer/importer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IMPORTER_IMPORTER_H_
6 #define CHROME_BROWSER_IMPORTER_IMPORTER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10
11 class ImporterBridge;
12
13 namespace importer {
14 struct SourceProfile;
15 }
16
17 // The base class of all importers.
18 class Importer : public base::RefCountedThreadSafe<Importer> {
19 public:
20 // All importers should implement this method by adding their import logic.
21 // And it will be run in file thread by ImporterHost. Since we do async
22 // import, the importer should invoke ImporterHost::NotifyImportEnded() to
23 // notify its host that import stuff have been finished.
24 virtual void StartImport(const importer::SourceProfile& source_profile,
25 uint16 items,
26 ImporterBridge* bridge) = 0;
27
28 // Cancels the import process.
29 virtual void Cancel();
30
31 bool cancelled() const { return cancelled_; }
32
33 protected:
34 friend class base::RefCountedThreadSafe<Importer>;
35
36 Importer();
37 virtual ~Importer();
38
39 scoped_refptr<ImporterBridge> bridge_;
40
41 private:
42 // True if the caller cancels the import process.
43 bool cancelled_;
44
45 DISALLOW_COPY_AND_ASSIGN(Importer);
46 };
47
48 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/ie_importer_utils_win.cc ('k') | chrome/browser/importer/importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698