| OLD | NEW |
| 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 #include "chrome/browser/importer/in_process_importer_bridge.h" | 5 #include "chrome/browser/importer/in_process_importer_bridge.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/dump_without_crashing.h" | 8 #include "base/debug/dump_without_crashing.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from | 81 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from |
| 82 // the search URL when importing search engines. | 82 // the search URL when importing search engines. |
| 83 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { | 83 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { |
| 84 public: | 84 public: |
| 85 FirefoxURLParameterFilter() {} | 85 FirefoxURLParameterFilter() {} |
| 86 virtual ~FirefoxURLParameterFilter() {} | 86 virtual ~FirefoxURLParameterFilter() {} |
| 87 | 87 |
| 88 // TemplateURLParser::ParameterFilter method. | 88 // TemplateURLParser::ParameterFilter method. |
| 89 virtual bool KeepParameter(const std::string& key, | 89 virtual bool KeepParameter(const std::string& key, |
| 90 const std::string& value) OVERRIDE { | 90 const std::string& value) override { |
| 91 std::string low_value = base::StringToLowerASCII(value); | 91 std::string low_value = base::StringToLowerASCII(value); |
| 92 if (low_value.find("mozilla") != std::string::npos || | 92 if (low_value.find("mozilla") != std::string::npos || |
| 93 low_value.find("firefox") != std::string::npos || | 93 low_value.find("firefox") != std::string::npos || |
| 94 low_value.find("moz:") != std::string::npos) { | 94 low_value.find("moz:") != std::string::npos) { |
| 95 return false; | 95 return false; |
| 96 } | 96 } |
| 97 return true; | 97 return true; |
| 98 } | 98 } |
| 99 | 99 |
| 100 private: | 100 private: |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 BrowserThread::PostTask( | 308 BrowserThread::PostTask( |
| 309 BrowserThread::UI, FROM_HERE, | 309 BrowserThread::UI, FROM_HERE, |
| 310 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_)); | 310 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_)); |
| 311 } | 311 } |
| 312 | 312 |
| 313 base::string16 InProcessImporterBridge::GetLocalizedString(int message_id) { | 313 base::string16 InProcessImporterBridge::GetLocalizedString(int message_id) { |
| 314 return l10n_util::GetStringUTF16(message_id); | 314 return l10n_util::GetStringUTF16(message_id); |
| 315 } | 315 } |
| 316 | 316 |
| 317 InProcessImporterBridge::~InProcessImporterBridge() {} | 317 InProcessImporterBridge::~InProcessImporterBridge() {} |
| OLD | NEW |