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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/registry.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/file_system_provider/registry.h" 5 #include "chrome/browser/chromeos/file_system_provider/registry.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h" 10 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 continue; 217 continue;
218 } 218 }
219 219
220 Watcher restored_watcher; 220 Watcher restored_watcher;
221 restored_watcher.entry_path = 221 restored_watcher.entry_path =
222 base::FilePath::FromUTF8Unsafe(entry_path); 222 base::FilePath::FromUTF8Unsafe(entry_path);
223 restored_watcher.recursive = recursive; 223 restored_watcher.recursive = recursive;
224 restored_watcher.last_tag = last_tag; 224 restored_watcher.last_tag = last_tag;
225 for (const auto& persistent_origin : *persistent_origins) { 225 for (const auto& persistent_origin : *persistent_origins) {
226 std::string origin; 226 std::string origin;
227 if (persistent_origin->GetAsString(&origin)) { 227 if (persistent_origin.GetAsString(&origin)) {
228 LOG(ERROR) << "Malformed subscriber information in preferences."; 228 LOG(ERROR) << "Malformed subscriber information in preferences.";
229 continue; 229 continue;
230 } 230 }
231 const GURL origin_as_gurl(origin); 231 const GURL origin_as_gurl(origin);
232 restored_watcher.subscribers[origin_as_gurl].origin = origin_as_gurl; 232 restored_watcher.subscribers[origin_as_gurl].origin = origin_as_gurl;
233 restored_watcher.subscribers[origin_as_gurl].persistent = true; 233 restored_watcher.subscribers[origin_as_gurl].persistent = true;
234 } 234 }
235 restored_file_system.watchers[WatcherKey( 235 restored_file_system.watchers[WatcherKey(
236 base::FilePath::FromUTF8Unsafe(entry_path), recursive)] = 236 base::FilePath::FromUTF8Unsafe(entry_path), recursive)] =
237 restored_watcher; 237 restored_watcher;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 LOG(ERROR) << "Broken preferences detected while updating a tag."; 271 LOG(ERROR) << "Broken preferences detected while updating a tag.";
272 return; 272 return;
273 } 273 }
274 274
275 watcher_value->SetStringWithoutPathExpansion(kPrefKeyWatcherLastTag, 275 watcher_value->SetStringWithoutPathExpansion(kPrefKeyWatcherLastTag,
276 watcher.last_tag); 276 watcher.last_tag);
277 } 277 }
278 278
279 } // namespace file_system_provider 279 } // namespace file_system_provider
280 } // namespace chromeos 280 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698