| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/importer/importer.h" | 5 #include "chrome/browser/importer/importer.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 if (turl_with_host_path) | 270 if (turl_with_host_path) |
| 271 model->SetDefaultSearchProvider(turl_with_host_path); | 271 model->SetDefaultSearchProvider(turl_with_host_path); |
| 272 else | 272 else |
| 273 NOTREACHED(); // BuildHostPathMap should only insert non-null values. | 273 NOTREACHED(); // BuildHostPathMap should only insert non-null values. |
| 274 } | 274 } |
| 275 delete t_url; | 275 delete t_url; |
| 276 continue; | 276 continue; |
| 277 } | 277 } |
| 278 if (t_url->url() && t_url->url()->IsValid()) { | 278 if (t_url->url() && t_url->url()->IsValid()) { |
| 279 model->Add(t_url); | 279 model->Add(t_url); |
| 280 if (default_keyword && t_url->url() && | 280 if (default_keyword && TemplateURL::SupportsReplacement(t_url)) |
| 281 t_url->url()->SupportsReplacement()) | |
| 282 model->SetDefaultSearchProvider(t_url); | 281 model->SetDefaultSearchProvider(t_url); |
| 283 } else { | 282 } else { |
| 284 // Don't add invalid TemplateURLs to the model. | 283 // Don't add invalid TemplateURLs to the model. |
| 285 delete t_url; | 284 delete t_url; |
| 286 } | 285 } |
| 287 } | 286 } |
| 288 } | 287 } |
| 289 | 288 |
| 290 void ProfileWriter::ShowBookmarkBar() { | 289 void ProfileWriter::ShowBookmarkBar() { |
| 291 DCHECK(profile_); | 290 DCHECK(profile_); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 ProfileInfo* firefox = new ProfileInfo(); | 700 ProfileInfo* firefox = new ProfileInfo(); |
| 702 firefox->description = l10n_util::GetString(IDS_IMPORT_FROM_FIREFOX); | 701 firefox->description = l10n_util::GetString(IDS_IMPORT_FROM_FIREFOX); |
| 703 firefox->browser_type = firefox_type; | 702 firefox->browser_type = firefox_type; |
| 704 firefox->source_path = source_path; | 703 firefox->source_path = source_path; |
| 705 firefox->app_path = GetFirefoxInstallPath(); | 704 firefox->app_path = GetFirefoxInstallPath(); |
| 706 firefox->services_supported = HISTORY | FAVORITES | COOKIES | PASSWORDS | | 705 firefox->services_supported = HISTORY | FAVORITES | COOKIES | PASSWORDS | |
| 707 SEARCH_ENGINES; | 706 SEARCH_ENGINES; |
| 708 source_profiles_.push_back(firefox); | 707 source_profiles_.push_back(firefox); |
| 709 } | 708 } |
| 710 } | 709 } |
| OLD | NEW |