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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc

Issue 268643002: Use the DefaultSearchManager as the exclusive authority on DSE, ignoring Web Data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Created 6 years, 7 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/profile_resetter/automatic_profile_resetter_delegate.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 scoped_ptr<base::DictionaryValue> tree(new base::DictionaryValue); 44 scoped_ptr<base::DictionaryValue> tree(new base::DictionaryValue);
45 tree->SetString("search_url", template_url->url()); 45 tree->SetString("search_url", template_url->url());
46 // If this value contains a placeholder in the pre-populated data, it will 46 // If this value contains a placeholder in the pre-populated data, it will
47 // have been replaced as it was loaded into a TemplateURL. 47 // have been replaced as it was loaded into a TemplateURL.
48 // BuildSubTreeFromTemplateURL works with TemplateURL (not TemplateURLData) 48 // BuildSubTreeFromTemplateURL works with TemplateURL (not TemplateURLData)
49 // in order to maintain this behaviour. 49 // in order to maintain this behaviour.
50 // TODO(engedy): Confirm the expected behaviour and convert to use 50 // TODO(engedy): Confirm the expected behaviour and convert to use
51 // TemplateURLData if possible." 51 // TemplateURLData if possible."
52 tree->SetString("search_terms_replacement_key", 52 tree->SetString("search_terms_replacement_key",
53 template_url->search_terms_replacement_key()); 53 template_url->search_terms_replacement_key());
54 tree->SetString("suggest_url", template_url->suggestions_url()); 54 tree->SetString("suggestions_url", template_url->suggestions_url());
55 tree->SetString("instant_url", template_url->instant_url()); 55 tree->SetString("instant_url", template_url->instant_url());
56 tree->SetString("image_url", template_url->image_url()); 56 tree->SetString("image_url", template_url->image_url());
57 tree->SetString("new_tab_url", template_url->new_tab_url()); 57 tree->SetString("new_tab_url", template_url->new_tab_url());
58 tree->SetString("search_url_post_params", 58 tree->SetString("search_url_post_params",
59 template_url->search_url_post_params()); 59 template_url->search_url_post_params());
60 tree->SetString("suggest_url_post_params", 60 tree->SetString("suggestions_url_post_params",
61 template_url->suggestions_url_post_params()); 61 template_url->suggestions_url_post_params());
62 tree->SetString("instant_url_post_params", 62 tree->SetString("instant_url_post_params",
63 template_url->instant_url_post_params()); 63 template_url->instant_url_post_params());
64 tree->SetString("image_url_post_params", 64 tree->SetString("image_url_post_params",
65 template_url->image_url_post_params()); 65 template_url->image_url_post_params());
66 tree->SetString("icon_url", template_url->favicon_url().spec()); 66 tree->SetString("favicon_url", template_url->favicon_url().spec());
67 tree->SetString("name", template_url->short_name()); 67 tree->SetString("name", template_url->short_name());
68 tree->SetString("keyword", template_url->keyword()); 68 tree->SetString("keyword", template_url->keyword());
69 base::ListValue* input_encodings = new base::ListValue; 69 base::ListValue* input_encodings = new base::ListValue;
70 input_encodings->AppendStrings(template_url->input_encodings()); 70 input_encodings->AppendStrings(template_url->input_encodings());
71 tree->Set("encodings", input_encodings); 71 tree->Set("input_encodings", input_encodings);
72 tree->SetString("id", base::Int64ToString(template_url->id())); 72 tree->SetString("id", base::Int64ToString(template_url->id()));
73 tree->SetString("prepopulate_id", 73 tree->SetInteger("prepopulate_id", template_url->prepopulate_id());
74 base::IntToString(template_url->prepopulate_id()));
75 base::ListValue* alternate_urls = new base::ListValue; 74 base::ListValue* alternate_urls = new base::ListValue;
76 alternate_urls->AppendStrings(template_url->alternate_urls()); 75 alternate_urls->AppendStrings(template_url->alternate_urls());
77 tree->Set("alternate_urls", alternate_urls); 76 tree->Set("alternate_urls", alternate_urls);
77 tree->SetBoolean("created_by_policy", template_url->created_by_policy());
78 tree->SetString("date_created",
79 base::Int64ToString(
80 template_url->date_created().ToInternalValue()));
81 tree->SetString("last_modified",
82 base::Int64ToString(
83 template_url->last_modified().ToInternalValue()));
84 tree->SetString("originating_url", template_url->originating_url().spec());
85 tree->SetBoolean("safe_for_autoreplace",
86 template_url->safe_for_autoreplace());
87 tree->SetString("short_name", template_url->short_name());
88 tree->SetString("url", template_url->url());
89 tree->SetInteger("usage_count", template_url->usage_count());
Peter Kasting 2014/05/07 23:38:29 Nit: This list of keys is in a seemingly random or
erikwright (departed) 2014/05/08 12:46:24 Done.
78 return tree.Pass(); 90 return tree.Pass();
79 } 91 }
80 92
81 #if defined(OS_WIN) 93 #if defined(OS_WIN)
82 void ExtractLoadedModuleNameDigests( 94 void ExtractLoadedModuleNameDigests(
83 const base::ListValue& module_list, 95 const base::ListValue& module_list,
84 base::ListValue* module_name_digests) { 96 base::ListValue* module_name_digests) {
85 DCHECK(module_name_digests); 97 DCHECK(module_name_digests);
86 98
87 // EnumerateModulesModel produces a list of dictionaries. 99 // EnumerateModulesModel produces a list of dictionaries.
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (difference) { 388 if (difference) {
377 old_settings_snapshot->Subtract(new_settings_snapshot); 389 old_settings_snapshot->Subtract(new_settings_snapshot);
378 std::string report = 390 std::string report =
379 SerializeSettingsReport(*old_settings_snapshot, difference); 391 SerializeSettingsReport(*old_settings_snapshot, difference);
380 SendFeedback(report); 392 SendFeedback(report);
381 } 393 }
382 } 394 }
383 content::BrowserThread::PostTask( 395 content::BrowserThread::PostTask(
384 content::BrowserThread::UI, FROM_HERE, user_callback); 396 content::BrowserThread::UI, FROM_HERE, user_callback);
385 } 397 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698