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

Side by Side Diff: chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bookmarks 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/api/signed_in_devices/signed_in_devices_api. h" 5 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api. h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h" 10 #include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 if (!pss) { 92 if (!pss) {
93 return scoped_ptr<DeviceInfo>(); 93 return scoped_ptr<DeviceInfo>();
94 } 94 }
95 std::string guid = pss->GetLocalSyncCacheGUID(); 95 std::string guid = pss->GetLocalSyncCacheGUID();
96 scoped_ptr<DeviceInfo> device = GetDeviceInfoForClientId(guid, 96 scoped_ptr<DeviceInfo> device = GetDeviceInfoForClientId(guid,
97 extension_id, 97 extension_id,
98 profile); 98 profile);
99 return device.Pass(); 99 return device.Pass();
100 } 100 }
101 101
102 bool SignedInDevicesGetFunction::RunImpl() { 102 bool SignedInDevicesGetFunction::RunSync() {
103 scoped_ptr<api::signed_in_devices::Get::Params> params( 103 scoped_ptr<api::signed_in_devices::Get::Params> params(
104 api::signed_in_devices::Get::Params::Create(*args_)); 104 api::signed_in_devices::Get::Params::Create(*args_));
105 EXTENSION_FUNCTION_VALIDATE(params.get()); 105 EXTENSION_FUNCTION_VALIDATE(params.get());
106 106
107 bool is_local = params->is_local.get() ? *params->is_local : false; 107 bool is_local = params->is_local.get() ? *params->is_local : false;
108 108
109 if (is_local) { 109 if (is_local) {
110 scoped_ptr<DeviceInfo> device = 110 scoped_ptr<DeviceInfo> device =
111 GetLocalDeviceInfo(extension_id(), GetProfile()); 111 GetLocalDeviceInfo(extension_id(), GetProfile());
112 base::ListValue* result = new base::ListValue(); 112 base::ListValue* result = new base::ListValue();
(...skipping 14 matching lines...) Expand all
127 ++it) { 127 ++it) {
128 result->Append((*it)->ToValue()); 128 result->Append((*it)->ToValue());
129 } 129 }
130 130
131 SetResult(result.release()); 131 SetResult(result.release());
132 return true; 132 return true;
133 } 133 }
134 134
135 } // namespace extensions 135 } // namespace extensions
136 136
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698