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

Side by Side Diff: sync/internal_api/public/util/sync_string_conversions.cc

Issue 10704214: [Sync] Refactor sync manager into interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Comments Created 8 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sync/internal_api/public/util/sync_string_conversions.h"
6
7 namespace syncer {
8
9 const char* ConnectionStatusToString(ConnectionStatus status) {
10 switch (status) {
11 case CONNECTION_OK:
12 return "CONNECTION_OK";
13 case CONNECTION_AUTH_ERROR:
14 return "CONNECTION_AUTH_ERROR";
15 case CONNECTION_SERVER_ERROR:
16 return "CONNECTION_SERVER_ERROR";
17 default:
18 NOTREACHED();
19 return "INVALID_CONNECTION_STATUS";
20 }
21 }
22
23 // Helper function that converts a PassphraseRequiredReason value to a string.
24 const char* PassphraseRequiredReasonToString(
25 PassphraseRequiredReason reason) {
26 switch (reason) {
27 case REASON_PASSPHRASE_NOT_REQUIRED:
28 return "REASON_PASSPHRASE_NOT_REQUIRED";
29 case REASON_ENCRYPTION:
30 return "REASON_ENCRYPTION";
31 case REASON_DECRYPTION:
32 return "REASON_DECRYPTION";
33 default:
34 NOTREACHED();
35 return "INVALID_REASON";
36 }
37 }
38
39 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698