OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 // The functionality provided here allows the user to import their bookmarks | 5 // The functionality provided here allows the user to import their bookmarks |
6 // (favorites) from Google Toolbar. | 6 // (favorites) from Google Toolbar. |
7 | 7 |
8 #ifndef CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ | 8 #ifndef CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ |
9 #define CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ | 9 #define CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/string16.h" | 18 #include "base/string16.h" |
19 #include "chrome/browser/importer/importer.h" | 19 #include "chrome/browser/importer/importer.h" |
20 #include "chrome/browser/importer/importer_data_types.h" | 20 #include "chrome/browser/importer/importer_data_types.h" |
21 #include "chrome/browser/importer/profile_writer.h" | 21 #include "chrome/browser/importer/profile_writer.h" |
22 #include "chrome/common/net/url_fetcher.h" | 22 #include "chrome/common/net/url_fetcher.h" |
23 | 23 |
24 class ImporterBridge; | 24 class ImporterBridge; |
25 class XmlReader; | 25 class XmlReader; |
26 | 26 |
27 // Currently the only configuration information we need is to check whether or | |
28 // not the user currently has their GAIA cookie. This is done by the function | |
29 // exposed through the ToolbarImportUtils namespace. | |
30 namespace toolbar_importer_utils { | |
31 bool IsGoogleGAIACookieInstalled(); | |
32 } | |
33 | |
34 // Toolbar5Importer is a class which exposes the functionality needed to | 27 // Toolbar5Importer is a class which exposes the functionality needed to |
35 // communicate with the Google Toolbar v5 front-end, negotiate the download of | 28 // communicate with the Google Toolbar v5 front-end, negotiate the download of |
36 // Toolbar bookmarks, parse them, and install them on the client. | 29 // Toolbar bookmarks, parse them, and install them on the client. |
37 // Toolbar5Importer should not have StartImport called more than once. Futher | 30 // Toolbar5Importer should not have StartImport called more than once. Futher |
38 // if StartImport is called, then the class must not be destroyed until it | 31 // if StartImport is called, then the class must not be destroyed until it |
39 // has either completed or Toolbar5Importer->Cancel() has been called. | 32 // has either completed or Toolbar5Importer->Cancel() has been called. |
40 class Toolbar5Importer : public URLFetcher::Delegate, public Importer { | 33 class Toolbar5Importer : public URLFetcher::Delegate, public Importer { |
41 public: | 34 public: |
42 Toolbar5Importer(); | 35 Toolbar5Importer(); |
43 | 36 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 160 |
168 // The fetchers need to be available to cancel the network call on user cancel | 161 // The fetchers need to be available to cancel the network call on user cancel |
169 // hence they are stored as member variables. | 162 // hence they are stored as member variables. |
170 URLFetcher* token_fetcher_; | 163 URLFetcher* token_fetcher_; |
171 URLFetcher* data_fetcher_; | 164 URLFetcher* data_fetcher_; |
172 | 165 |
173 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); | 166 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); |
174 }; | 167 }; |
175 | 168 |
176 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ | 169 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ |
OLD | NEW |