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

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

Issue 740423002: bookmarks: Move BaseBookmarkModelObserver into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ 5 #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_
6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ 6 #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 10 matching lines...) Expand all
21 class FirefoxProfileLock; 21 class FirefoxProfileLock;
22 class Importer; 22 class Importer;
23 class Profile; 23 class Profile;
24 24
25 namespace importer { 25 namespace importer {
26 struct SourceProfile; 26 struct SourceProfile;
27 } 27 }
28 28
29 // This class manages the import process. It creates the in-process half of the 29 // This class manages the import process. It creates the in-process half of the
30 // importer bridge and the external process importer client. 30 // importer bridge and the external process importer client.
31 class ExternalProcessImporterHost : public BaseBookmarkModelObserver { 31 class ExternalProcessImporterHost
32 : public bookmarks::BaseBookmarkModelObserver {
32 public: 33 public:
33 ExternalProcessImporterHost(); 34 ExternalProcessImporterHost();
34 35
35 void Cancel(); 36 void Cancel();
36 37
37 // Starts the process of importing the settings and data depending on what the 38 // Starts the process of importing the settings and data depending on what the
38 // user selected. 39 // user selected.
39 // |source_profile| - importer profile to import. 40 // |source_profile| - importer profile to import.
40 // |target_profile| - profile to import into. 41 // |target_profile| - profile to import into.
41 // |items| - specifies which data to import (bitmask of importer::ImportItem). 42 // |items| - specifies which data to import (bitmask of importer::ImportItem).
(...skipping 30 matching lines...) Expand all
72 private: 73 private:
73 // ExternalProcessImporterHost deletes itself in OnImportEnded(). 74 // ExternalProcessImporterHost deletes itself in OnImportEnded().
74 ~ExternalProcessImporterHost() override; 75 ~ExternalProcessImporterHost() override;
75 76
76 // Launches the utility process that starts the import task, unless bookmark 77 // Launches the utility process that starts the import task, unless bookmark
77 // or template model are not yet loaded. If load is not detected, this method 78 // or template model are not yet loaded. If load is not detected, this method
78 // will be called when the loading observer sees that model loading is 79 // will be called when the loading observer sees that model loading is
79 // complete. 80 // complete.
80 virtual void LaunchImportIfReady(); 81 virtual void LaunchImportIfReady();
81 82
82 // BaseBookmarkModelObserver: 83 // bookmarks::BaseBookmarkModelObserver:
83 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; 84 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override;
84 void BookmarkModelBeingDeleted(BookmarkModel* model) override; 85 void BookmarkModelBeingDeleted(BookmarkModel* model) override;
85 void BookmarkModelChanged() override; 86 void BookmarkModelChanged() override;
86 87
87 // Called when TemplateURLService has been loaded. 88 // Called when TemplateURLService has been loaded.
88 void OnTemplateURLServiceLoaded(); 89 void OnTemplateURLServiceLoaded();
89 90
90 // ShowWarningDialog() asks user to close the application that is owning the 91 // ShowWarningDialog() asks user to close the application that is owning the
91 // lock. They can retry or skip the importing process. 92 // lock. They can retry or skip the importing process.
92 // This method should not be called if the importer is in headless mode. 93 // This method should not be called if the importer is in headless mode.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // True if the import process has been cancelled. 154 // True if the import process has been cancelled.
154 bool cancelled_; 155 bool cancelled_;
155 156
156 // Vends weak pointers for the importer to call us back. 157 // Vends weak pointers for the importer to call us back.
157 base::WeakPtrFactory<ExternalProcessImporterHost> weak_ptr_factory_; 158 base::WeakPtrFactory<ExternalProcessImporterHost> weak_ptr_factory_;
158 159
159 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterHost); 160 DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterHost);
160 }; 161 };
161 162
162 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ 163 #endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmarks_api.h ('k') | chrome/browser/profiles/bookmark_model_loaded_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698