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

Side by Side Diff: chrome/browser/chromeos/extensions/default_app_order.cc

Issue 1556783002: Convert Pass()→std::move() for CrOS extension code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/default_app_order.h" 5 #include "chrome/browser/chromeos/extensions/default_app_order.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
11 #include "base/json/json_file_value_serializer.h" 13 #include "base/json/json_file_value_serializer.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/path_service.h" 15 #include "base/path_service.h"
14 #include "base/time/time.h" 16 #include "base/time/time.h"
15 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
16 #include "chrome/common/extensions/extension_constants.h" 18 #include "chrome/common/extensions/extension_constants.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 JSONFileValueDeserializer deserializer(path); 69 JSONFileValueDeserializer deserializer(path);
68 std::string error_msg; 70 std::string error_msg;
69 scoped_ptr<base::Value> value = deserializer.Deserialize(NULL, &error_msg); 71 scoped_ptr<base::Value> value = deserializer.Deserialize(NULL, &error_msg);
70 if (!value) { 72 if (!value) {
71 LOG(WARNING) << "Unable to deserialize default app ordinals json data:" 73 LOG(WARNING) << "Unable to deserialize default app ordinals json data:"
72 << error_msg << ", file=" << path.value(); 74 << error_msg << ", file=" << path.value();
73 return NULL; 75 return NULL;
74 } 76 }
75 77
76 scoped_ptr<base::ListValue> ordinal_list_value = 78 scoped_ptr<base::ListValue> ordinal_list_value =
77 base::ListValue::From(value.Pass()); 79 base::ListValue::From(std::move(value));
78 if (!ordinal_list_value) 80 if (!ordinal_list_value)
79 LOG(WARNING) << "Expect a JSON list in file " << path.value(); 81 LOG(WARNING) << "Expect a JSON list in file " << path.value();
80 82
81 return ordinal_list_value; 83 return ordinal_list_value;
82 } 84 }
83 85
84 std::string GetLocaleSpecificStringImpl( 86 std::string GetLocaleSpecificStringImpl(
85 const base::DictionaryValue* root, 87 const base::DictionaryValue* root,
86 const std::string& locale, 88 const std::string& locale,
87 const std::string& dictionary_name, 89 const std::string& dictionary_name,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 std::string GetOemAppsFolderName() { 197 std::string GetOemAppsFolderName() {
196 // |loader_instance| could be NULL for test. 198 // |loader_instance| could be NULL for test.
197 if (!loader_instance) 199 if (!loader_instance)
198 return std::string(); 200 return std::string();
199 else 201 else
200 return loader_instance->GetOemAppsFolderName(); 202 return loader_instance->GetOemAppsFolderName();
201 } 203 }
202 204
203 } // namespace default_app_order 205 } // namespace default_app_order
204 } // namespace chromeos 206 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698