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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual void StartImport(const importer::SourceProfile& source_profile, | 40 virtual void StartImport(const importer::SourceProfile& source_profile, |
41 uint16 items, | 41 uint16 items, |
42 ImporterBridge* bridge) OVERRIDE; | 42 ImporterBridge* bridge) OVERRIDE; |
43 | 43 |
44 // Importer view call this method when the user clicks the cancel button | 44 // Importer view call this method when the user clicks the cancel button |
45 // in the tabbed options UI. We need to post a message to our loop | 45 // in the tabbed options UI. We need to post a message to our loop |
46 // to cancel network retrieval. | 46 // to cancel network retrieval. |
47 virtual void Cancel(); | 47 virtual void Cancel(); |
48 | 48 |
49 // content::URLFetcherDelegate method called back from the URLFetcher object. | 49 // content::URLFetcherDelegate method called back from the URLFetcher object. |
50 virtual void OnURLFetchComplete(const URLFetcher* source); | 50 virtual void OnURLFetchComplete(const content::URLFetcher* source); |
51 | 51 |
52 private: | 52 private: |
53 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); | 53 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); |
54 | 54 |
55 virtual ~Toolbar5Importer(); | 55 virtual ~Toolbar5Importer(); |
56 | 56 |
57 // Internal states of the toolbar importer. | 57 // Internal states of the toolbar importer. |
58 enum InternalStateEnum { | 58 enum InternalStateEnum { |
59 NOT_USED = -1, | 59 NOT_USED = -1, |
60 INITIALIZED, | 60 INITIALIZED, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void AddBookmarksToChrome( | 146 void AddBookmarksToChrome( |
147 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks); | 147 const std::vector<ProfileWriter::BookmarkEntry>& bookmarks); |
148 | 148 |
149 InternalStateEnum state_; | 149 InternalStateEnum state_; |
150 | 150 |
151 // Bitmask of Importer::ImportItem. | 151 // Bitmask of Importer::ImportItem. |
152 uint16 items_to_import_; | 152 uint16 items_to_import_; |
153 | 153 |
154 // The fetchers need to be available to cancel the network call on user cancel | 154 // The fetchers need to be available to cancel the network call on user cancel |
155 // hence they are stored as member variables. | 155 // hence they are stored as member variables. |
156 URLFetcher* token_fetcher_; | 156 content::URLFetcher* token_fetcher_; |
157 URLFetcher* data_fetcher_; | 157 content::URLFetcher* data_fetcher_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); | 159 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); |
160 }; | 160 }; |
161 | 161 |
162 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ | 162 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ |
OLD | NEW |