| 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/importer/external_process_importer_host.h" | 10 #include "chrome/browser/importer/external_process_importer_host.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from | 68 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from |
| 69 // the search URL when importing search engines. | 69 // the search URL when importing search engines. |
| 70 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { | 70 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { |
| 71 public: | 71 public: |
| 72 FirefoxURLParameterFilter() {} | 72 FirefoxURLParameterFilter() {} |
| 73 virtual ~FirefoxURLParameterFilter() {} | 73 virtual ~FirefoxURLParameterFilter() {} |
| 74 | 74 |
| 75 // TemplateURLParser::ParameterFilter method. | 75 // TemplateURLParser::ParameterFilter method. |
| 76 virtual bool KeepParameter(const std::string& key, | 76 virtual bool KeepParameter(const std::string& key, |
| 77 const std::string& value) OVERRIDE { | 77 const std::string& value) OVERRIDE { |
| 78 std::string low_value = StringToLowerASCII(value); | 78 std::string low_value = base::StringToLowerASCII(value); |
| 79 if (low_value.find("mozilla") != std::string::npos || | 79 if (low_value.find("mozilla") != std::string::npos || |
| 80 low_value.find("firefox") != std::string::npos || | 80 low_value.find("firefox") != std::string::npos || |
| 81 low_value.find("moz:") != std::string::npos) { | 81 low_value.find("moz:") != std::string::npos) { |
| 82 return false; | 82 return false; |
| 83 } | 83 } |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 DISALLOW_COPY_AND_ASSIGN(FirefoxURLParameterFilter); | 88 DISALLOW_COPY_AND_ASSIGN(FirefoxURLParameterFilter); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 BrowserThread::PostTask( | 277 BrowserThread::PostTask( |
| 278 BrowserThread::UI, FROM_HERE, | 278 BrowserThread::UI, FROM_HERE, |
| 279 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_)); | 279 base::Bind(&ExternalProcessImporterHost::NotifyImportEnded, host_)); |
| 280 } | 280 } |
| 281 | 281 |
| 282 base::string16 InProcessImporterBridge::GetLocalizedString(int message_id) { | 282 base::string16 InProcessImporterBridge::GetLocalizedString(int message_id) { |
| 283 return l10n_util::GetStringUTF16(message_id); | 283 return l10n_util::GetStringUTF16(message_id); |
| 284 } | 284 } |
| 285 | 285 |
| 286 InProcessImporterBridge::~InProcessImporterBridge() {} | 286 InProcessImporterBridge::~InProcessImporterBridge() {} |
| OLD | NEW |