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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/app_list/arc/arc_app_list_prefs.h" 5 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const std::string& path) 64 const std::string& path)
65 : DictionaryPrefUpdate(service, path), id_(id) {} 65 : DictionaryPrefUpdate(service, path), id_(id) {}
66 66
67 ~ScopedArcPrefUpdate() override {} 67 ~ScopedArcPrefUpdate() override {}
68 68
69 // DictionaryPrefUpdate overrides: 69 // DictionaryPrefUpdate overrides:
70 base::DictionaryValue* Get() override { 70 base::DictionaryValue* Get() override {
71 base::DictionaryValue* dict = DictionaryPrefUpdate::Get(); 71 base::DictionaryValue* dict = DictionaryPrefUpdate::Get();
72 base::DictionaryValue* dict_item = nullptr; 72 base::DictionaryValue* dict_item = nullptr;
73 if (!dict->GetDictionaryWithoutPathExpansion(id_, &dict_item)) { 73 if (!dict->GetDictionaryWithoutPathExpansion(id_, &dict_item)) {
74 dict_item = new base::DictionaryValue(); 74 dict->SetWithoutPathExpansion(id_,
75 dict->SetWithoutPathExpansion(id_, dict_item); 75 base::MakeUnique<base::DictionaryValue>());
76 dict->GetDictionaryWithoutPathExpansion(id_, &dict_item);
76 } 77 }
77 return dict_item; 78 return dict_item;
78 } 79 }
79 80
80 private: 81 private:
81 const std::string id_; 82 const std::string id_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(ScopedArcPrefUpdate); 84 DISALLOW_COPY_AND_ASSIGN(ScopedArcPrefUpdate);
84 }; 85 };
85 86
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 int64_t last_backup_android_id, 1436 int64_t last_backup_android_id,
1436 int64_t last_backup_time, 1437 int64_t last_backup_time,
1437 bool should_sync, 1438 bool should_sync,
1438 bool system) 1439 bool system)
1439 : package_name(package_name), 1440 : package_name(package_name),
1440 package_version(package_version), 1441 package_version(package_version),
1441 last_backup_android_id(last_backup_android_id), 1442 last_backup_android_id(last_backup_android_id),
1442 last_backup_time(last_backup_time), 1443 last_backup_time(last_backup_time),
1443 should_sync(should_sync), 1444 should_sync(should_sync),
1444 system(system) {} 1445 system(system) {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service.cc ('k') | chrome/browser/ui/webui/chromeos/login/base_webui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698