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

Unified Diff: chrome/browser/chromeos/gdata/gdata_util.cc

Issue 10914173: Wrap ChromeOS specific functions with OS_CHROMEOS macro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_util.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc
index 69ae4bba34decda2874f2a29b4bab87c295534d6..be89b7563efbabac3ad28a3a1429612e627d7719 100644
--- a/chrome/browser/chromeos/gdata/gdata_util.cc
+++ b/chrome/browser/chromeos/gdata/gdata_util.cc
@@ -15,13 +15,16 @@
#include "base/stringprintf.h"
#include "base/time.h"
#include "base/tracked_objects.h"
-#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/login/user_manager.h"
+#endif // OS_CHROMEOS
+
using content::BrowserThread;
namespace gdata {
@@ -61,6 +64,7 @@ bool ParseTimezone(const base::StringPiece& timezone,
} // namespace
bool IsGDataAvailable(Profile* profile) {
+#if defined(OS_CHROMEOS)
if (!chromeos::UserManager::Get()->IsUserLoggedIn() ||
chromeos::UserManager::Get()->IsLoggedInAsGuest() ||
chromeos::UserManager::Get()->IsLoggedInAsDemoUser())
@@ -77,6 +81,11 @@ bool IsGDataAvailable(Profile* profile) {
return false;
return true;
+#else
+ // TODO(nhiroki): Check if GData is available or not in a platform
+ // independent way (http://crbug.com/147529).
+ return false;
+#endif // OS_CHROMEOS
}
bool IsDriveV2ApiEnabled() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698