OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 { L"flickr.com", | 87 { L"flickr.com", |
88 "http://www.flickr.com/photos/tags/?q={searchTerms}" }, | 88 "http://www.flickr.com/photos/tags/?q={searchTerms}" }, |
89 { L"imdb.com", | 89 { L"imdb.com", |
90 "http://www.imdb.com/find?q={searchTerms}" }, | 90 "http://www.imdb.com/find?q={searchTerms}" }, |
91 { L"webster.com", | 91 { L"webster.com", |
92 "http://www.webster.com/cgi-bin/dictionary?va={searchTerms}" }, | 92 "http://www.webster.com/cgi-bin/dictionary?va={searchTerms}" }, |
93 // Search keywords. | 93 // Search keywords. |
94 { L"\x4E2D\x6587", "http://www.google.com/" }, | 94 { L"\x4E2D\x6587", "http://www.google.com/" }, |
95 }; | 95 }; |
96 | 96 |
97 const int kDefaultFirefoxKeywordIndex = 8; | |
98 | |
99 class FirefoxObserver : public ProfileWriter, | 97 class FirefoxObserver : public ProfileWriter, |
100 public importer::ImporterProgressObserver { | 98 public importer::ImporterProgressObserver { |
101 public: | 99 public: |
102 FirefoxObserver() | 100 FirefoxObserver() |
103 : ProfileWriter(NULL), bookmark_count_(0), history_count_(0), | 101 : ProfileWriter(NULL), bookmark_count_(0), history_count_(0), |
104 password_count_(0), keyword_count_(0), import_search_engines_(true) { | 102 password_count_(0), keyword_count_(0), import_search_engines_(true) { |
105 } | 103 } |
106 | 104 |
107 explicit FirefoxObserver(bool import_search_engines) | 105 explicit FirefoxObserver(bool import_search_engines) |
108 : ProfileWriter(NULL), bookmark_count_(0), history_count_(0), | 106 : ProfileWriter(NULL), bookmark_count_(0), history_count_(0), |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 285 } |
288 | 286 |
289 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 287 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
290 MAYBE_IMPORTER(Firefox35Importer)) { | 288 MAYBE_IMPORTER(Firefox35Importer)) { |
291 bool import_search_engines = false; | 289 bool import_search_engines = false; |
292 scoped_refptr<FirefoxObserver> observer( | 290 scoped_refptr<FirefoxObserver> observer( |
293 new FirefoxObserver(import_search_engines)); | 291 new FirefoxObserver(import_search_engines)); |
294 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), | 292 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), |
295 observer.get(), import_search_engines); | 293 observer.get(), import_search_engines); |
296 } | 294 } |
OLD | NEW |