From 74253badae1577a9c9b0da584db72d277210fc27 Mon Sep 17 00:00:00 2001
From: "brettw@chromium.org"
 <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sun, 8 Aug 2010 17:18:22 +0000
Subject: Remove sync_types.h. No functions from this file are used, and some
 of them are explicitly disallowed in Google code (DWORD).

This implicitly brought string_util into a number of files which got ASCII
conversion routimes. I replaced these with *ToUTF8 from utf_string_conversions
since I am trying to delete WideToASCII.

TEST=it compiles
BUG=none

Review URL: http://codereview.chromium.org/3063021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55367 0039d316-1c4b-4281-b951-d872f2087c98
---
 .../browser/sync/engine/apply_updates_command.cc   |  1 -
 chrome/browser/sync/engine/apply_updates_command.h |  1 -
 chrome/browser/sync/engine/auth_watcher.h          |  1 -
 chrome/browser/sync/engine/build_commit_command.cc |  4 +-
 .../sync/engine/download_updates_command.cc        |  1 -
 .../browser/sync/engine/get_commit_ids_command.cc  |  1 -
 .../browser/sync/engine/get_commit_ids_command.h   |  1 -
 chrome/browser/sync/engine/model_safe_worker.h     |  1 -
 .../sync/engine/net/server_connection_manager.h    |  1 -
 .../sync/engine/post_commit_message_command.cc     |  1 -
 .../sync/engine/post_commit_message_command.h      |  1 -
 chrome/browser/sync/engine/syncer_command.cc       |  1 -
 chrome/browser/sync/engine/syncer_proto_util.h     |  1 -
 chrome/browser/sync/engine/syncer_util.cc          |  1 -
 chrome/browser/sync/engine/syncer_util.h           |  1 -
 .../browser/sync/glue/password_model_associator.cc |  6 +--
 chrome/browser/sync/glue/sync_backend_host.cc      |  4 +-
 chrome/browser/sync/protocol/service_constants.h   |  2 -
 chrome/browser/sync/sessions/ordered_commit_set.cc |  2 +
 .../sync/syncable/directory_backing_store.cc       | 47 +++++++++++-----------
 chrome/browser/sync/syncable/directory_manager.h   |  1 -
 chrome/browser/sync/syncable/path_name_cmp.h       |  2 -
 chrome/browser/sync/syncable/syncable.cc           |  1 +
 chrome/browser/sync/syncable/syncable.h            |  1 -
 chrome/browser/sync/syncable/syncable_id.h         |  1 -
 chrome/browser/sync/syncable/syncable_unittest.cc  |  1 +
 chrome/browser/sync/util/crypto_helpers.h          |  1 -
 chrome/browser/sync/util/data_encryption.h         |  1 -
 chrome/browser/sync/util/sync_types.h              | 39 ------------------
 chrome/browser/sync/util/user_settings.h           |  1 -
 chrome/browser/sync/util/user_settings_posix.cc    |  1 +
 .../multiple_client_live_preferences_sync_test.cc  |  1 +
 .../test/sync/engine/test_directory_setter_upper.h |  1 -
 33 files changed, 37 insertions(+), 94 deletions(-)
 delete mode 100644 chrome/browser/sync/util/sync_types.h

diff --git a/chrome/browser/sync/engine/apply_updates_command.cc b/chrome/browser/sync/engine/apply_updates_command.cc
index 1853f2c..c14dc81 100644
--- a/chrome/browser/sync/engine/apply_updates_command.cc
+++ b/chrome/browser/sync/engine/apply_updates_command.cc
@@ -8,7 +8,6 @@
 #include "chrome/browser/sync/sessions/sync_session.h"
 #include "chrome/browser/sync/syncable/directory_manager.h"
 #include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace browser_sync {
 
diff --git a/chrome/browser/sync/engine/apply_updates_command.h b/chrome/browser/sync/engine/apply_updates_command.h
index 6a09f2e..6afe63c 100644
--- a/chrome/browser/sync/engine/apply_updates_command.h
+++ b/chrome/browser/sync/engine/apply_updates_command.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace syncable {
 class WriteTransaction;
diff --git a/chrome/browser/sync/engine/auth_watcher.h b/chrome/browser/sync/engine/auth_watcher.h
index 9400bd1..594758f 100644
--- a/chrome/browser/sync/engine/auth_watcher.h
+++ b/chrome/browser/sync/engine/auth_watcher.h
@@ -18,7 +18,6 @@
 #include "base/scoped_ptr.h"
 #include "base/thread.h"
 #include "chrome/browser/sync/protocol/service_constants.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "chrome/common/deprecated/event_sys.h"
 #include "chrome/common/net/gaia/gaia_authenticator.h"
 
diff --git a/chrome/browser/sync/engine/build_commit_command.cc b/chrome/browser/sync/engine/build_commit_command.cc
index b3767e4..d74cc63 100644
--- a/chrome/browser/sync/engine/build_commit_command.cc
+++ b/chrome/browser/sync/engine/build_commit_command.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
 
@@ -8,13 +8,13 @@
 #include <string>
 #include <vector>
 
+#include "base/string_util.h"
 #include "chrome/browser/sync/engine/syncer_proto_util.h"
 #include "chrome/browser/sync/engine/syncer_util.h"
 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
 #include "chrome/browser/sync/sessions/sync_session.h"
 #include "chrome/browser/sync/syncable/syncable.h"
 #include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using std::set;
 using std::string;
diff --git a/chrome/browser/sync/engine/download_updates_command.cc b/chrome/browser/sync/engine/download_updates_command.cc
index 94ee7f1..b3606fd 100644
--- a/chrome/browser/sync/engine/download_updates_command.cc
+++ b/chrome/browser/sync/engine/download_updates_command.cc
@@ -11,7 +11,6 @@
 #include "chrome/browser/sync/engine/syncproto.h"
 #include "chrome/browser/sync/sessions/sync_session.h"
 #include "chrome/browser/sync/syncable/directory_manager.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using syncable::ScopedDirLookup;
 
diff --git a/chrome/browser/sync/engine/get_commit_ids_command.cc b/chrome/browser/sync/engine/get_commit_ids_command.cc
index 5b6d228..f4e6334 100644
--- a/chrome/browser/sync/engine/get_commit_ids_command.cc
+++ b/chrome/browser/sync/engine/get_commit_ids_command.cc
@@ -10,7 +10,6 @@
 
 #include "chrome/browser/sync/engine/syncer_util.h"
 #include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using std::set;
 using std::vector;
diff --git a/chrome/browser/sync/engine/get_commit_ids_command.h b/chrome/browser/sync/engine/get_commit_ids_command.h
index d10d6ed..c730a64 100644
--- a/chrome/browser/sync/engine/get_commit_ids_command.h
+++ b/chrome/browser/sync/engine/get_commit_ids_command.h
@@ -13,7 +13,6 @@
 #include "chrome/browser/sync/engine/syncer_util.h"
 #include "chrome/browser/sync/sessions/ordered_commit_set.h"
 #include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using std::pair;
 using std::vector;
diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/chrome/browser/sync/engine/model_safe_worker.h
index 5d749d8..4164ff5 100644
--- a/chrome/browser/sync/engine/model_safe_worker.h
+++ b/chrome/browser/sync/engine/model_safe_worker.h
@@ -13,7 +13,6 @@
 #include "base/callback.h"
 #include "base/ref_counted.h"
 #include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace browser_sync {
 
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.h b/chrome/browser/sync/engine/net/server_connection_manager.h
index d6bfdde..9798e5a 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.h
+++ b/chrome/browser/sync/engine/net/server_connection_manager.h
@@ -16,7 +16,6 @@
 #include "base/scoped_ptr.h"
 #include "base/string_util.h"
 #include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "chrome/common/deprecated/event_sys.h"
 #include "chrome/common/deprecated/event_sys-inl.h"
 #include "chrome/common/net/http_return.h"
diff --git a/chrome/browser/sync/engine/post_commit_message_command.cc b/chrome/browser/sync/engine/post_commit_message_command.cc
index 92a4cc4..7eff0a4 100644
--- a/chrome/browser/sync/engine/post_commit_message_command.cc
+++ b/chrome/browser/sync/engine/post_commit_message_command.cc
@@ -10,7 +10,6 @@
 #include "chrome/browser/sync/engine/syncproto.h"
 #include "chrome/browser/sync/sessions/sync_session.h"
 #include "chrome/browser/sync/syncable/directory_manager.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using std::vector;
 
diff --git a/chrome/browser/sync/engine/post_commit_message_command.h b/chrome/browser/sync/engine/post_commit_message_command.h
index d052267..107c6e2 100644
--- a/chrome/browser/sync/engine/post_commit_message_command.h
+++ b/chrome/browser/sync/engine/post_commit_message_command.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "chrome/browser/sync/engine/syncer_command.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace browser_sync {
 
diff --git a/chrome/browser/sync/engine/syncer_command.cc b/chrome/browser/sync/engine/syncer_command.cc
index f95cf40..4e13918 100644
--- a/chrome/browser/sync/engine/syncer_command.cc
+++ b/chrome/browser/sync/engine/syncer_command.cc
@@ -7,7 +7,6 @@
 #include "chrome/browser/sync/engine/net/server_connection_manager.h"
 #include "chrome/browser/sync/sessions/sync_session.h"
 #include "chrome/browser/sync/syncable/directory_manager.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "chrome/common/deprecated/event_sys-inl.h"
 
 namespace browser_sync {
diff --git a/chrome/browser/sync/engine/syncer_proto_util.h b/chrome/browser/sync/engine/syncer_proto_util.h
index ac3d014..39fcc5c 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.h
+++ b/chrome/browser/sync/engine/syncer_proto_util.h
@@ -11,7 +11,6 @@
 #include "base/gtest_prod_util.h"
 #include "chrome/browser/sync/syncable/blob.h"
 #include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace syncable {
 class Directory;
diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc
index efcb8db..c2639d6 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/chrome/browser/sync/engine/syncer_util.cc
@@ -19,7 +19,6 @@
 #include "chrome/browser/sync/syncable/model_type.h"
 #include "chrome/browser/sync/syncable/syncable.h"
 #include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using syncable::BASE_VERSION;
 using syncable::Blob;
diff --git a/chrome/browser/sync/engine/syncer_util.h b/chrome/browser/sync/engine/syncer_util.h
index 0282da0..d840cec 100644
--- a/chrome/browser/sync/engine/syncer_util.h
+++ b/chrome/browser/sync/engine/syncer_util.h
@@ -18,7 +18,6 @@
 #include "chrome/browser/sync/engine/syncer_types.h"
 #include "chrome/browser/sync/syncable/syncable.h"
 #include "chrome/browser/sync/syncable/syncable_id.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 namespace browser_sync {
 
diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc
index fa2d9eb..4b5940c 100644
--- a/chrome/browser/sync/glue/password_model_associator.cc
+++ b/chrome/browser/sync/glue/password_model_associator.cc
@@ -352,9 +352,9 @@ void PasswordModelAssociator::WriteToSyncNode(
 std::string PasswordModelAssociator::MakeTag(
                 const webkit_glue::PasswordForm& password) {
   return MakeTag(password.origin.spec(),
-                 UTF16ToASCII(password.username_element),
-                 UTF16ToASCII(password.username_value),
-                 UTF16ToASCII(password.password_element),
+                 UTF16ToUTF8(password.username_element),
+                 UTF16ToUTF8(password.username_value),
+                 UTF16ToUTF8(password.password_element),
                  password.signon_realm);
 }
 
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 2578c7e..0d04d4c 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -376,8 +376,8 @@ std::string MakeUserAgentForSyncapi() {
     return user_agent;
   }
 
-  user_agent += WideToASCII(version_info->product_version());
-  user_agent += " (" + WideToASCII(version_info->last_change()) + ")";
+  user_agent += WideToUTF8(version_info->product_version());
+  user_agent += " (" + WideToUTF8(version_info->last_change()) + ")";
   if (!version_info->is_official_build())
     user_agent += "-devel";
   return user_agent;
diff --git a/chrome/browser/sync/protocol/service_constants.h b/chrome/browser/sync/protocol/service_constants.h
index 0541a34..ef80043 100644
--- a/chrome/browser/sync/protocol/service_constants.h
+++ b/chrome/browser/sync/protocol/service_constants.h
@@ -4,8 +4,6 @@
 //
 // Product-specific constants.
 
-#include "chrome/browser/sync/util/sync_types.h"
-
 #ifndef CHROME_BROWSER_SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
 #define CHROME_BROWSER_SYNC_PROTOCOL_SERVICE_CONSTANTS_H_
 #pragma once
diff --git a/chrome/browser/sync/sessions/ordered_commit_set.cc b/chrome/browser/sync/sessions/ordered_commit_set.cc
index 5c46a35..104bafb 100644
--- a/chrome/browser/sync/sessions/ordered_commit_set.cc
+++ b/chrome/browser/sync/sessions/ordered_commit_set.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/sync/sessions/ordered_commit_set.h"
 
+#include <algorithm>
+
 #include "base/logging.h"
 
 namespace browser_sync {
diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc
index c9f281e..8dc939cd 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.cc
+++ b/chrome/browser/sync/syncable/directory_backing_store.cc
@@ -17,6 +17,7 @@
 #include "base/logging.h"
 #include "base/stl_util-inl.h"
 #include "base/string_number_conversions.h"
+#include "base/string_util.h"
 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
 #include "chrome/browser/sync/protocol/service_constants.h"
 #include "chrome/browser/sync/protocol/sync.pb.h"
@@ -184,13 +185,13 @@ bool DirectoryBackingStore::OpenAndConfigureHandleHelper(
   if (SQLITE_OK == sqlite_utils::OpenSqliteDb(backing_filepath_, handle)) {
     sqlite_utils::scoped_sqlite_db_ptr scoped_handle(*handle);
     sqlite3_busy_timeout(scoped_handle.get(), std::numeric_limits<int>::max());
-    {
-      string integrity_error;
-      bool is_ok = CheckIntegrity(scoped_handle.get(), &integrity_error);
-      if (!is_ok) {
-        LOG(ERROR) << "Integrity check failed: " << integrity_error;
-        return false;
-      }
+    {
+      string integrity_error;
+      bool is_ok = CheckIntegrity(scoped_handle.get(), &integrity_error);
+      if (!is_ok) {
+        LOG(ERROR) << "Integrity check failed: " << integrity_error;
+        return false;
+      }
     }
     {
       SQLStatement statement;
@@ -223,21 +224,21 @@ bool DirectoryBackingStore::OpenAndConfigureHandleHelper(
   }
   return false;
 }
-
-bool DirectoryBackingStore::CheckIntegrity(sqlite3* handle, string* error)
-    const {
-  SQLStatement statement;
-  statement.prepare(handle, "PRAGMA integrity_check(1)");
-  if (SQLITE_ROW != statement.step()) {
-    *error =  sqlite3_errmsg(handle);
-    return false;
-  }
-  string integrity_result = statement.column_text(0);
-  if (integrity_result != "ok") {
-    *error = integrity_result;
-    return false;
-  }
-  return true;
+
+bool DirectoryBackingStore::CheckIntegrity(sqlite3* handle, string* error)
+    const {
+  SQLStatement statement;
+  statement.prepare(handle, "PRAGMA integrity_check(1)");
+  if (SQLITE_ROW != statement.step()) {
+    *error =  sqlite3_errmsg(handle);
+    return false;
+  }
+  string integrity_result = statement.column_text(0);
+  if (integrity_result != "ok") {
+    *error = integrity_result;
+    return false;
+  }
+  return true;
 }
 
 DirOpenResult DirectoryBackingStore::DoLoad(MetahandlesIndex* entry_bucket,
@@ -944,7 +945,7 @@ int DirectoryBackingStore::CreateTables() {
 
 sqlite3* DirectoryBackingStore::LazyGetSaveHandle() {
   if (!save_dbhandle_ && !OpenAndConfigureHandleHelper(&save_dbhandle_)) {
-    DCHECK(FALSE) << "Unable to open handle for saving";
+    NOTREACHED() << "Unable to open handle for saving";
     return NULL;
   }
   return save_dbhandle_;
diff --git a/chrome/browser/sync/syncable/directory_manager.h b/chrome/browser/sync/syncable/directory_manager.h
index 55cc28c..a6f0847 100644
--- a/chrome/browser/sync/syncable/directory_manager.h
+++ b/chrome/browser/sync/syncable/directory_manager.h
@@ -23,7 +23,6 @@
 #include "chrome/browser/sync/syncable/path_name_cmp.h"
 #include "chrome/browser/sync/syncable/syncable.h"
 #include "chrome/browser/sync/util/cryptographer.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "chrome/common/deprecated/event_sys.h"
 
 namespace sync_api { class BaseTransaction; }
diff --git a/chrome/browser/sync/syncable/path_name_cmp.h b/chrome/browser/sync/syncable/path_name_cmp.h
index 1da0200..d89441e 100644
--- a/chrome/browser/sync/syncable/path_name_cmp.h
+++ b/chrome/browser/sync/syncable/path_name_cmp.h
@@ -8,8 +8,6 @@
 
 #include <string>
 
-#include "chrome/browser/sync/util/sync_types.h"
-
 namespace syncable {
 
 struct LessPathNames {
diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
index bd31f8e..63ddb98 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/chrome/browser/sync/syncable/syncable.cc
@@ -32,6 +32,7 @@
 #include "base/perftimer.h"
 #include "base/scoped_ptr.h"
 #include "base/string_number_conversions.h"
+#include "base/string_util.h"
 #include "base/stl_util-inl.h"
 #include "base/time.h"
 #include "chrome/browser/sync/engine/syncer.h"
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h
index f227989..05a8c95 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/chrome/browser/sync/syncable/syncable.h
@@ -30,7 +30,6 @@
 #include "chrome/browser/sync/syncable/model_type.h"
 #include "chrome/browser/sync/util/channel.h"
 #include "chrome/browser/sync/util/dbgq.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "chrome/common/deprecated/event_sys.h"
 
 struct PurgeInfo;
diff --git a/chrome/browser/sync/syncable/syncable_id.h b/chrome/browser/sync/syncable/syncable_id.h
index 55a44f1..8fb6358 100644
--- a/chrome/browser/sync/syncable/syncable_id.h
+++ b/chrome/browser/sync/syncable/syncable_id.h
@@ -13,7 +13,6 @@
 
 #include "base/hash_tables.h"
 #include "chrome/browser/sync/util/fast_dump.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 extern "C" {
 struct sqlite3;
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index 18695e7..72bea4d 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -26,6 +26,7 @@
 #include "base/platform_thread.h"
 #include "base/scoped_ptr.h"
 #include "base/scoped_temp_dir.h"
+#include "base/string_util.h"
 #include "chrome/browser/sync/engine/syncproto.h"
 #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
 #include "chrome/browser/sync/syncable/directory_backing_store.h"
diff --git a/chrome/browser/sync/util/crypto_helpers.h b/chrome/browser/sync/util/crypto_helpers.h
index 14935c1..5caca42 100644
--- a/chrome/browser/sync/util/crypto_helpers.h
+++ b/chrome/browser/sync/util/crypto_helpers.h
@@ -14,7 +14,6 @@
 #include "base/logging.h"
 #include "base/md5.h"
 #include "base/port.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 class MD5Calculator {
  protected:
diff --git a/chrome/browser/sync/util/data_encryption.h b/chrome/browser/sync/util/data_encryption.h
index e36e7a9..1fd0b19 100644
--- a/chrome/browser/sync/util/data_encryption.h
+++ b/chrome/browser/sync/util/data_encryption.h
@@ -11,7 +11,6 @@
 
 #include "base/basictypes.h"
 #include "base/logging.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 using std::string;
 using std::vector;
diff --git a/chrome/browser/sync/util/sync_types.h b/chrome/browser/sync/util/sync_types.h
deleted file mode 100644
index b2c703c..0000000
--- a/chrome/browser/sync/util/sync_types.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2009 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 CHROME_BROWSER_SYNC_UTIL_SYNC_TYPES_H_
-#define CHROME_BROWSER_SYNC_UTIL_SYNC_TYPES_H_
-#pragma once
-
-#include <iosfwd>
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/string_util.h"
-#include "build/build_config.h"
-
-#if !defined(OS_WIN)
-// Mac OS X typedef's BOOL to signed char, so we do that on Linux too.
-typedef signed char BOOL;
-typedef int32 LONG;
-typedef uint32 DWORD;
-typedef int64 LONGLONG;
-typedef uint64 ULONGLONG;
-
-#define MAX_PATH PATH_MAX
-#if !defined(TRUE)
-const BOOL TRUE = 1;
-#endif
-#if !defined(FALSE)
-const BOOL FALSE = 0;
-#endif
-#endif
-
-inline size_t CountBytes(const std::string &s) {
-  return s.size() * sizeof(std::string::value_type);
-}
-
-const size_t kSyncProtocolMaxNameLengthBytes = 255;
-
-#endif  // CHROME_BROWSER_SYNC_UTIL_SYNC_TYPES_H_
diff --git a/chrome/browser/sync/util/user_settings.h b/chrome/browser/sync/util/user_settings.h
index 11e95a8..9008c9c 100644
--- a/chrome/browser/sync/util/user_settings.h
+++ b/chrome/browser/sync/util/user_settings.h
@@ -13,7 +13,6 @@
 #include "base/file_path.h"
 #include "base/lock.h"
 #include "build/build_config.h"
-#include "chrome/browser/sync/util/sync_types.h"
 
 extern "C" struct sqlite3;
 
diff --git a/chrome/browser/sync/util/user_settings_posix.cc b/chrome/browser/sync/util/user_settings_posix.cc
index f3f6cdc..71fda9f 100644
--- a/chrome/browser/sync/util/user_settings_posix.cc
+++ b/chrome/browser/sync/util/user_settings_posix.cc
@@ -6,6 +6,7 @@
 
 #include "chrome/browser/sync/util/user_settings.h"
 
+#include "base/logging.h"
 #include "chrome/browser/password_manager/encryptor.h"
 #include "chrome/common/sqlite_utils.h"
 
diff --git a/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc b/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
index 63fcb57..e001773 100644
--- a/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
+++ b/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/scoped_ptr.h"
+#include "base/string_util.h"
 #include "chrome/test/live_sync/live_preferences_sync_test.h"
 #include "chrome/browser/scoped_pref_update.h"
 
diff --git a/chrome/test/sync/engine/test_directory_setter_upper.h b/chrome/test/sync/engine/test_directory_setter_upper.h
index ecaa08cb..c924532 100644
--- a/chrome/test/sync/engine/test_directory_setter_upper.h
+++ b/chrome/test/sync/engine/test_directory_setter_upper.h
@@ -37,7 +37,6 @@
 #include "base/scoped_temp_dir.h"
 #include "chrome/browser/sync/syncable/directory_manager.h"
 #include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/sync_types.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace syncable {
-- 
cgit v1.1