| 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 28 matching lines...) Expand all Loading... |
| 39 // The importer view calls this method to begin the process. |items| should | 39 // The importer view calls this method to begin the process. |items| should |
| 40 // only either be NONE or FAVORITES, since as of right now these are the only | 40 // only either be NONE or FAVORITES, since as of right now these are the only |
| 41 // items this importer supports. | 41 // items this importer supports. |
| 42 virtual void StartImport(const importer::SourceProfile& source_profile, | 42 virtual void StartImport(const importer::SourceProfile& source_profile, |
| 43 uint16 items, | 43 uint16 items, |
| 44 ImporterBridge* bridge) OVERRIDE; | 44 ImporterBridge* bridge) OVERRIDE; |
| 45 | 45 |
| 46 // Importer view call this method when the user clicks the cancel button | 46 // Importer view call this method when the user clicks the cancel button |
| 47 // in the tabbed options UI. We need to post a message to our loop | 47 // in the tabbed options UI. We need to post a message to our loop |
| 48 // to cancel network retrieval. | 48 // to cancel network retrieval. |
| 49 virtual void Cancel(); | 49 virtual void Cancel() OVERRIDE; |
| 50 | 50 |
| 51 // content::URLFetcherDelegate method called back from the URLFetcher object. | 51 // content::URLFetcherDelegate method called back from the URLFetcher object. |
| 52 virtual void OnURLFetchComplete(const content::URLFetcher* source); | 52 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); | 55 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); |
| 56 | 56 |
| 57 virtual ~Toolbar5Importer(); | 57 virtual ~Toolbar5Importer(); |
| 58 | 58 |
| 59 // Internal states of the toolbar importer. | 59 // Internal states of the toolbar importer. |
| 60 enum InternalStateEnum { | 60 enum InternalStateEnum { |
| 61 NOT_USED = -1, | 61 NOT_USED = -1, |
| 62 INITIALIZED, | 62 INITIALIZED, |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 content::URLFetcher* token_fetcher_; | 158 content::URLFetcher* token_fetcher_; |
| 159 content::URLFetcher* data_fetcher_; | 159 content::URLFetcher* data_fetcher_; |
| 160 | 160 |
| 161 // Used to get correct login data for the toolbar server. | 161 // Used to get correct login data for the toolbar server. |
| 162 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 162 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 163 | 163 |
| 164 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); | 164 DISALLOW_COPY_AND_ASSIGN(Toolbar5Importer); |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ | 167 #endif // CHROME_BROWSER_IMPORTER_TOOLBAR_IMPORTER_H_ |
| OLD | NEW |