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

Side by Side Diff: ui/app_list/search/history_data_store.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 | « tools/json_schema_compiler/util.h ('k') | ui/display/manager/json_converter.cc » ('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 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 "ui/app_list/search/history_data_store.h" 5 #include "ui/app_list/search/history_data_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 17 matching lines...) Expand all
28 const char kKeySecondary[] = "s"; 28 const char kKeySecondary[] = "s";
29 const char kKeyUpdateTime[] = "t"; 29 const char kKeyUpdateTime[] = "t";
30 30
31 // Extracts strings from ListValue. 31 // Extracts strings from ListValue.
32 void GetSecondary(const base::ListValue* list, 32 void GetSecondary(const base::ListValue* list,
33 HistoryData::SecondaryDeque* secondary) { 33 HistoryData::SecondaryDeque* secondary) {
34 HistoryData::SecondaryDeque results; 34 HistoryData::SecondaryDeque results;
35 for (base::ListValue::const_iterator it = list->begin(); it != list->end(); 35 for (base::ListValue::const_iterator it = list->begin(); it != list->end();
36 ++it) { 36 ++it) {
37 std::string str; 37 std::string str;
38 if (!it->GetAsString(&str)) 38 if (!(*it)->GetAsString(&str))
39 return; 39 return;
40 40
41 results.push_back(str); 41 results.push_back(str);
42 } 42 }
43 43
44 secondary->swap(results); 44 secondary->swap(results);
45 } 45 }
46 46
47 // V1 format json dictionary: 47 // V1 format json dictionary:
48 // { 48 // {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 OnLoadedCallback callback, 216 OnLoadedCallback callback,
217 std::unique_ptr<base::DictionaryValue> dict) { 217 std::unique_ptr<base::DictionaryValue> dict) {
218 if (!dict) { 218 if (!dict) {
219 callback.Run(nullptr); 219 callback.Run(nullptr);
220 } else { 220 } else {
221 callback.Run(Parse(std::move(dict))); 221 callback.Run(Parse(std::move(dict)));
222 } 222 }
223 } 223 }
224 224
225 } // namespace app_list 225 } // namespace app_list
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/util.h ('k') | ui/display/manager/json_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698