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

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

Issue 324283003: Move search_terms_data to components/search_engines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/default_search_policy_handler.h" 5 #include "chrome/browser/search_engines/default_search_policy_handler.h"
6 6
7 #include "base/prefs/pref_value_map.h" 7 #include "base/prefs/pref_value_map.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "chrome/browser/search_engines/default_search_manager.h" 11 #include "chrome/browser/search_engines/default_search_manager.h"
12 #include "chrome/browser/search_engines/search_terms_data.h"
13 #include "chrome/browser/search_engines/template_url.h" 12 #include "chrome/browser/search_engines/template_url.h"
14 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
15 #include "components/policy/core/browser/policy_error_map.h" 14 #include "components/policy/core/browser/policy_error_map.h"
16 #include "components/policy/core/common/policy_map.h" 15 #include "components/policy/core/common/policy_map.h"
16 #include "components/search_engines/search_terms_data.h"
17 #include "grit/components_strings.h" 17 #include "grit/components_strings.h"
18 #include "policy/policy_constants.h" 18 #include "policy/policy_constants.h"
19 19
20 namespace policy { 20 namespace policy {
21 21
22 namespace { 22 namespace {
23 // Extracts a list from a policy value and adds it to a pref dictionary. 23 // Extracts a list from a policy value and adds it to a pref dictionary.
24 void SetListInPref(const PolicyMap& policies, 24 void SetListInPref(const PolicyMap& policies,
25 const char* policy_name, 25 const char* policy_name,
26 const char* key, 26 const char* key,
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void DefaultSearchPolicyHandler::EnsureListPrefExists( 453 void DefaultSearchPolicyHandler::EnsureListPrefExists(
454 PrefValueMap* prefs, 454 PrefValueMap* prefs,
455 const std::string& path) { 455 const std::string& path) {
456 base::Value* value; 456 base::Value* value;
457 base::ListValue* list_value; 457 base::ListValue* list_value;
458 if (!prefs->GetValue(path, &value) || !value->GetAsList(&list_value)) 458 if (!prefs->GetValue(path, &value) || !value->GetAsList(&list_value))
459 prefs->SetValue(path, new base::ListValue()); 459 prefs->SetValue(path, new base::ListValue());
460 } 460 }
461 461
462 } // namespace policy 462 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/search/search_unittest.cc ('k') | chrome/browser/search_engines/search_host_to_urls_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698