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

Unified Diff: ios/chrome/browser/ui/sync/sync_util.h

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/sync/sync_fake_server_egtest.mm ('k') | ios/chrome/browser/ui/sync/sync_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/sync/sync_util.h
diff --git a/ios/chrome/browser/ui/sync/sync_util.h b/ios/chrome/browser/ui/sync/sync_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..359e0cedeea05fee559237e172766bef412cc092
--- /dev/null
+++ b/ios/chrome/browser/ui/sync/sync_util.h
@@ -0,0 +1,53 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_SYNC_SYNC_UTIL_H_
+#define IOS_CHROME_BROWSER_UI_SYNC_SYNC_UTIL_H_
+
+#include <Foundation/Foundation.h>
+
+#include "google_apis/gaia/google_service_auth_error.h"
+#include "ios/chrome/browser/sync/sync_setup_service.h"
+
+@class GenericChromeCommand;
+@class Tab;
+
+namespace ios {
+class ChromeBrowserState;
+}
+
+namespace ios_internal {
+namespace sync {
+
+// Gets the top-level description message associated with the sync error state
+// of |browserState|. Returns nil if there is no sync error.
+NSString* GetSyncErrorDescriptionForBrowserState(
+ ios::ChromeBrowserState* browserState);
+
+// Gets the string message associated with the sync error state of
+// |browserState|. The returned error message does not contain any links.
+// Returns nil if there is no sync error.
+NSString* GetSyncErrorMessageForBrowserState(
+ ios::ChromeBrowserState* browserState);
+
+// Gets the title of the button to fix the sync error of |browserState|.
+// Returns nil if there is no sync error or it can't be fixed by a user action.
+NSString* GetSyncErrorButtonTitleForBrowserState(
+ ios::ChromeBrowserState* browserState);
+
+// Gets the command associated with the sync state of |browserState|.
+GenericChromeCommand* GetSyncCommandForBrowserState(
+ ios::ChromeBrowserState* browserState);
+
+// Check for sync errors, and display any that ought to be shown to the user.
+// Returns true if an infobar was brought up.
+bool displaySyncErrors(ios::ChromeBrowserState* browser_state, Tab* tab);
+
+// Returns true if |errorState| corresponds to a transient sync error.
+bool IsTransientSyncError(SyncSetupService::SyncServiceState errorState);
+
+} // namespace sync
+} // namespace ios_internal
+
+#endif // IOS_CHROME_BROWSER_UI_SYNC_SYNC_UTIL_H_
« no previous file with comments | « ios/chrome/browser/ui/sync/sync_fake_server_egtest.mm ('k') | ios/chrome/browser/ui/sync/sync_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698