summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/importer_data_types.h
blob: e8fbfdef1f4815008b429a444842fe8d387851db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_IMPORTER_IMPORTER_DATA_TYPES_H_
#define CHROME_BROWSER_IMPORTER_IMPORTER_DATA_TYPES_H_

#include <string>

#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/string16.h"
#include "chrome/browser/importer/importer_type.h"
#include "net/url_request/url_request_context_getter.h"

// Types needed for importing data from other browsers and the Google Toolbar.
namespace importer {

// An enumeration of the type of data that can be imported.
enum ImportItem {
  NONE           = 0,
  HISTORY        = 1 << 0,
  FAVORITES      = 1 << 1,
  COOKIES        = 1 << 2,  // Not supported yet.
  PASSWORDS      = 1 << 3,
  SEARCH_ENGINES = 1 << 4,
  HOME_PAGE      = 1 << 5,
  ALL            = (1 << 6) - 1  // All the bits should be 1, hence the -1.
};

// Information about a profile needed by an importer to do import work.
struct SourceProfile {
  SourceProfile();
  ~SourceProfile();

  string16 importer_name;
  ImporterType importer_type;
  FilePath source_path;
  FilePath app_path;
  uint16 services_supported;  // Bitmask of ImportItem.
  // The URLRequestContextGetter is only used for Google Toolbar.
  scoped_refptr<net::URLRequestContextGetter> request_context_getter;
};

}  // namespace importer

#endif  // CHROME_BROWSER_IMPORTER_IMPORTER_DATA_TYPES_H_