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

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_service.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 "components/wifi_sync/wifi_credential_syncable_service.h" 5 #include "components/wifi_sync/wifi_credential_syncable_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
8 #include <utility> 9 #include <utility>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "components/sync/api/sync_change.h"
14 #include "components/sync/api/sync_data.h"
15 #include "components/sync/api/sync_error.h"
16 #include "components/sync/api/sync_error_factory.h"
17 #include "components/sync/api/sync_merge_result.h"
18 #include "components/sync/protocol/sync.pb.h"
12 #include "components/wifi_sync/wifi_credential.h" 19 #include "components/wifi_sync/wifi_credential.h"
13 #include "components/wifi_sync/wifi_security_class.h" 20 #include "components/wifi_sync/wifi_security_class.h"
14 #include "sync/api/sync_change.h"
15 #include "sync/api/sync_data.h"
16 #include "sync/api/sync_error.h"
17 #include "sync/api/sync_error_factory.h"
18 #include "sync/api/sync_merge_result.h"
19 #include "sync/protocol/sync.pb.h"
20 21
21 namespace wifi_sync { 22 namespace wifi_sync {
22 23
23 namespace { 24 namespace {
24 25
25 struct RawCredentialData { 26 struct RawCredentialData {
26 std::vector<uint8_t> ssid; 27 std::vector<uint8_t> ssid;
27 WifiSecurityClass security_class; 28 WifiSecurityClass security_class;
28 std::string passphrase; 29 std::string passphrase;
29 }; 30 };
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if (sync_error.IsSet()) { 226 if (sync_error.IsSet()) {
226 LOG(ERROR) << sync_error.ToString(); 227 LOG(ERROR) << sync_error.ToString();
227 return false; 228 return false;
228 } 229 }
229 230
230 synced_networks_and_passphrases_[network_id] = credential.passphrase(); 231 synced_networks_and_passphrases_[network_id] = credential.passphrase();
231 return true; 232 return true;
232 } 233 }
233 234
234 } // namespace wifi_sync 235 } // namespace wifi_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698