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

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

Issue 74653002: sync: Add --enable-sync-sessions-v2 and necessary plumbing to use SessionsSyncManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 pss, 85 pss,
86 extension_prefs); 86 extension_prefs);
87 } 87 }
88 88
89 scoped_ptr<DeviceInfo> GetLocalDeviceInfo(const std::string& extension_id, 89 scoped_ptr<DeviceInfo> GetLocalDeviceInfo(const std::string& extension_id,
90 Profile* profile) { 90 Profile* profile) {
91 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile); 91 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile);
92 if (!pss) { 92 if (!pss) {
93 return scoped_ptr<DeviceInfo>(); 93 return scoped_ptr<DeviceInfo>();
94 } 94 }
95 std::string guid = pss->GetLocalDeviceGUID(); 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::RunImpl() {
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());
(...skipping 21 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
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_apitest.cc ('k') | chrome/browser/prerender/prerender_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698