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

Side by Side Diff: chrome/browser/search_engines/util.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 | Annotate | Revision Log
OLDNEW
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/search_engines/util.h" 5 #include "chrome/browser/search_engines/util.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "chrome/browser/prefs/pref_service.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/search_engines/template_url.h" 17 #include "chrome/browser/search_engines/template_url.h"
17 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 18 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
18 #include "chrome/browser/search_engines/template_url_service.h" 19 #include "chrome/browser/search_engines/template_url_service.h"
19 #include "chrome/browser/search_engines/template_url_service_factory.h" 20 #include "chrome/browser/search_engines/template_url_service_factory.h"
20 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
21 22
22 using content::BrowserThread; 23 using content::BrowserThread;
23 24
24 string16 GetDefaultSearchEngineName(Profile* profile) { 25 string16 GetDefaultSearchEngineName(Profile* profile) {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 std::vector<std::string> deduped_encodings; 303 std::vector<std::string> deduped_encodings;
303 std::set<std::string> encoding_set; 304 std::set<std::string> encoding_set;
304 for (std::vector<std::string>::const_iterator i(encodings->begin()); 305 for (std::vector<std::string>::const_iterator i(encodings->begin());
305 i != encodings->end(); ++i) { 306 i != encodings->end(); ++i) {
306 if (encoding_set.insert(*i).second) 307 if (encoding_set.insert(*i).second)
307 deduped_encodings.push_back(*i); 308 deduped_encodings.push_back(*i);
308 } 309 }
309 encodings->swap(deduped_encodings); 310 encodings->swap(deduped_encodings);
310 return encodings->size() != deduped_encodings.size(); 311 return encodings->size() != deduped_encodings.size();
311 } 312 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698