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

Side by Side Diff: chrome/browser/importer/firefox_importer_utils.cc

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 years, 3 months 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
« no previous file with comments | « chrome/browser/icon_loader.h ('k') | chrome/browser/input_window_dialog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/firefox_importer_utils.h" 5 #include "chrome/browser/importer/firefox_importer_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/search_engines/template_url.h" 13 #include "chrome/browser/search_engines/template_url.h"
14 #include "chrome/browser/search_engines/template_url_model.h" 14 #include "chrome/browser/search_engines/template_url_model.h"
15 #include "chrome/browser/search_engines/template_url_parser.h" 15 #include "chrome/browser/search_engines/template_url_parser.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 17
18 namespace { 18 namespace {
19 19
20 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from 20 // FirefoxURLParameterFilter is used to remove parameter mentioning Firefox from
21 // the search URL when importing search engines. 21 // the search URL when importing search engines.
22 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { 22 class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter {
23 public: 23 public:
24 FirefoxURLParameterFilter() {} 24 FirefoxURLParameterFilter() { }
25 virtual ~FirefoxURLParameterFilter() {} 25 ~FirefoxURLParameterFilter() { }
26 26
27 // TemplateURLParser::ParameterFilter method. 27 // TemplateURLParser::ParameterFilter method.
28 virtual bool KeepParameter(const std::string& key, 28 virtual bool KeepParameter(const std::string& key,
29 const std::string& value) { 29 const std::string& value) {
30 std::string low_value = StringToLowerASCII(value); 30 std::string low_value = StringToLowerASCII(value);
31 if (low_value.find("mozilla") != std::string::npos || 31 if (low_value.find("mozilla") != std::string::npos ||
32 low_value.find("firefox") != std::string::npos || 32 low_value.find("firefox") != std::string::npos ||
33 low_value.find("moz:") != std::string::npos ) 33 low_value.find("moz:") != std::string::npos )
34 return false; 34 return false;
35 return true; 35 return true;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 std::vector<std::string> urls; 323 std::vector<std::string> urls;
324 SplitString(default_homepages, '|', &urls); 324 SplitString(default_homepages, '|', &urls);
325 325
326 for (size_t i = 0; i < urls.size(); ++i) { 326 for (size_t i = 0; i < urls.size(); ++i) {
327 if (homepage.spec() == GURL(urls[i]).spec()) 327 if (homepage.spec() == GURL(urls[i]).spec())
328 return true; 328 return true;
329 } 329 }
330 330
331 return false; 331 return false;
332 } 332 }
OLDNEW
« no previous file with comments | « chrome/browser/icon_loader.h ('k') | chrome/browser/input_window_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698