summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/automation/automation_profile_impl.h2
-rw-r--r--chrome/browser/browser.cc10
-rw-r--r--chrome/browser/browser.h2
-rw-r--r--chrome/browser/browser_about_handler.cc13
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.cc4
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.h4
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc2
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc10
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.h6
-rw-r--r--chrome/browser/gtk/standard_menus.cc2
-rw-r--r--chrome/browser/profile.cc6
-rw-r--r--chrome/browser/profile.h2
-rw-r--r--chrome/browser/sync/engine/syncer_thread.cc4
-rw-r--r--chrome/browser/sync/engine/syncer_thread_timed_stop.cc2
-rw-r--r--chrome/browser/sync/engine/syncer_unittest.cc2
-rw-r--r--chrome/browser/sync/glue/bookmark_model_worker.cc5
-rw-r--r--chrome/browser/sync/glue/bookmark_model_worker.h4
-rw-r--r--chrome/browser/sync/glue/bookmark_model_worker_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/change_processor.cc4
-rw-r--r--chrome/browser/sync/glue/change_processor.h4
-rw-r--r--chrome/browser/sync/glue/http_bridge.cc4
-rw-r--r--chrome/browser/sync/glue/http_bridge.h4
-rw-r--r--chrome/browser/sync/glue/http_bridge_unittest.cc4
-rw-r--r--chrome/browser/sync/glue/model_associator.cc4
-rw-r--r--chrome/browser/sync/glue/model_associator.h4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.h8
-rw-r--r--chrome/browser/sync/notifier/base/async_dns_lookup.cc7
-rw-r--r--chrome/browser/sync/notifier/base/fastalloc.h2
-rw-r--r--chrome/browser/sync/notifier/base/nethelpers.h6
-rw-r--r--chrome/browser/sync/notifier/base/time.h2
-rw-r--r--chrome/browser/sync/notifier/communicator/mailbox.cc2
-rw-r--r--chrome/browser/sync/notifier/communicator/mailbox.h2
-rw-r--r--chrome/browser/sync/notifier/gaia_auth/inet_aton.h2
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_impl.cc6
-rw-r--r--chrome/browser/sync/profile_sync_service.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service.h4
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc4
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc4
-rw-r--r--chrome/browser/sync/sync_setup_flow.h4
-rw-r--r--chrome/browser/sync/sync_setup_wizard.cc4
-rw-r--r--chrome/browser/sync/sync_setup_wizard_unittest.cc4
-rw-r--r--chrome/browser/sync/sync_status_ui_helper.cc4
-rw-r--r--chrome/browser/sync/sync_status_ui_helper.h4
-rw-r--r--chrome/browser/sync/syncable/directory_backing_store.cc6
-rw-r--r--chrome/browser/sync/syncable/syncable.cc12
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc4
-rw-r--r--chrome/browser/sync/util/character_set_converters_unittest.cc8
-rw-r--r--chrome/browser/sync/util/compat_file.h2
-rw-r--r--chrome/browser/sync/util/compat_file_posix.cc4
-rw-r--r--chrome/browser/sync/util/event_sys-inl.h2
-rw-r--r--chrome/browser/sync/util/event_sys_unittest.cc8
-rw-r--r--chrome/browser/sync/util/highres_timer_unittest.cc15
-rw-r--r--chrome/browser/sync/util/path_helpers_unittest.cc6
-rw-r--r--chrome/browser/sync/util/query_helpers.cc8
-rw-r--r--chrome/browser/sync/util/sync_types.h2
-rw-r--r--chrome/browser/sync/util/user_settings.cc2
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc46
-rw-r--r--chrome/browser/views/bookmark_bar_view.h8
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc29
-rw-r--r--chrome/browser/views/bookmark_manager_view.h10
-rw-r--r--chrome/browser/views/options/content_page_view.cc24
-rw-r--r--chrome/browser/views/options/content_page_view.h12
-rw-r--r--chrome/browser/views/toolbar_view.cc2
-rwxr-xr-xchrome/chrome.gyp20
-rw-r--r--chrome/test/live_sync/bookmark_model_verifier.cc4
-rw-r--r--chrome/test/live_sync/bookmark_model_verifier.h4
-rw-r--r--chrome/test/live_sync/live_bookmarks_sync_test.cc4
-rw-r--r--chrome/test/live_sync/live_bookmarks_sync_test.h4
-rw-r--r--chrome/test/live_sync/profile_sync_service_test_harness.cc4
-rw-r--r--chrome/test/live_sync/profile_sync_service_test_harness.h4
-rw-r--r--chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc4
-rw-r--r--chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc4
-rw-r--r--chrome/test/testing_profile.cc4
-rw-r--r--chrome/test/testing_profile.h2
75 files changed, 221 insertions, 236 deletions
diff --git a/chrome/browser/automation/automation_profile_impl.h b/chrome/browser/automation/automation_profile_impl.h
index c464f73..e4d9ac6 100644
--- a/chrome/browser/automation/automation_profile_impl.h
+++ b/chrome/browser/automation/automation_profile_impl.h
@@ -172,7 +172,7 @@ class AutomationProfileImpl : public Profile {
return original_profile_->GetDesktopNotificationService();
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
virtual ProfileSyncService* GetProfileSyncService() {
return original_profile_->GetProfileSyncService();
}
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 29ecb09..86ac5c7 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -43,6 +43,7 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/status_bubble.h"
+#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/tab_contents/interstitial_page.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
@@ -58,9 +59,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/url_constants.h"
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/browser/sync/profile_sync_service.h"
-#endif
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -1184,7 +1182,7 @@ void Browser::OpenImportSettingsDialog() {
window_->ShowImportDialog();
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void Browser::OpenSyncMyBookmarksDialog() {
ProfileSyncService* service = profile_->GetProfileSyncService();
// TODO(timsteele): Incognito has no sync service for the time being,
@@ -1198,7 +1196,7 @@ void Browser::OpenSyncMyBookmarksDialog() {
ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_WRENCH);
}
}
-#endif
+#endif // defined(BROWSER_SYNC)
void Browser::OpenAboutChromeDialog() {
UserMetrics::RecordAction(L"AboutChrome", profile_);
@@ -1441,7 +1439,7 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_SHOW_DOWNLOADS: ShowDownloadsTab(); break;
case IDC_SHOW_APP_MENU: ShowAppMenu(); break;
case IDC_SHOW_PAGE_MENU: ShowPageMenu(); break;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
case IDC_SYNC_BOOKMARKS: OpenSyncMyBookmarksDialog(); break;
#endif
case IDC_OPTIONS: OpenOptionsDialog(); break;
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index dc4b808..9fb8a4c 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -390,7 +390,7 @@ class Browser : public TabStripModelDelegate,
void OpenOptionsDialog();
void OpenKeywordEditor();
void OpenPasswordManager();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void OpenSyncMyBookmarksDialog();
#endif
void OpenImportSettingsDialog();
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 9c07143..9a9e94b 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -28,6 +28,8 @@
#include "chrome/browser/profile_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
+#include "chrome/browser/sync/auth_error_state.h"
+#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/histogram_synchronizer.h"
#include "chrome/common/jstemplate_builder.h"
@@ -59,13 +61,10 @@
#include "third_party/tcmalloc/tcmalloc/src/google/malloc_extension.h"
#endif
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/browser/sync/auth_error_state.h"
-#include "chrome/browser/sync/profile_sync_service.h"
+#if defined(BROWSER_SYNC)
using sync_api::SyncManager;
#endif
-
using base::Time;
using base::TimeDelta;
@@ -470,7 +469,7 @@ std::string AboutVersion(DictionaryValue* localized_strings) {
return output;
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
static void AddBoolSyncDetail(ListValue* details, const std::wstring& stat_name,
bool stat_value) {
DictionaryValue* val = new DictionaryValue;
@@ -561,7 +560,7 @@ std::string AboutSync() {
return jstemplate_builder::GetTemplateHtml(
sync_html, &strings , "t" /* template root node id */);
}
-#endif
+#endif // defined(BROWSER_SYNC)
// AboutSource -----------------------------------------------------------------
@@ -625,7 +624,7 @@ void AboutSource::StartDataRequest(const std::string& path_raw,
} else if (path == kTermsPath) {
response = AboutTerms();
} else if (path == kSyncPath) {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
response = AboutSync();
#endif
}
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
index e5239a5..7a24310 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/dom_ui/new_tab_page_sync_handler.h"
@@ -227,4 +227,4 @@ void NewTabPageSyncHandler::SendSyncMessageToPage(
dom_ui_->CallJavascriptFunction(L"syncMessageChanged", value);
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.h b/chrome/browser/dom_ui/new_tab_page_sync_handler.h
index 9774640..3e120ad 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.h
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_PAGE_SYNC_HANDLER_H_
#define CHROME_BROWSER_DOM_UI_NEW_TAB_PAGE_SYNC_HANDLER_H_
@@ -68,4 +68,4 @@ class NewTabPageSyncHandler : public DOMMessageHandler,
};
#endif // CHROME_BROWSER_DOM_UI_NEW_TAB_PAGE_SYNC_HANDLER_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 238a46a..a432574 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -881,7 +881,7 @@ NewTabUI::NewTabUI(TabContents* contents)
if (WebResourcesEnabled())
AddMessageHandler((new TipsHandler())->Attach(this));
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) {
AddMessageHandler((new NewTabPageSyncHandler())->Attach(this));
}
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index 7943521..b58f3ed 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -118,7 +118,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window,
model_(NULL),
instructions_label_(NULL),
instructions_(NULL),
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_error_button_(NULL),
sync_service_(NULL),
#endif
@@ -129,7 +129,7 @@ BookmarkBarGtk::BookmarkBarGtk(BrowserWindowGtk* window,
menu_bar_helper_(this),
floating_(false),
last_allocation_width_(-1) {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (profile->GetProfileSyncService()) {
// Obtain a pointer to the profile sync service and add our instance as an
// observer.
@@ -156,7 +156,7 @@ BookmarkBarGtk::~BookmarkBarGtk() {
bookmark_toolbar_.Destroy();
event_box_.Destroy();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (sync_service_)
sync_service_->RemoveObserver(this);
#endif
@@ -266,7 +266,7 @@ void BookmarkBarGtk::Init(Profile* profile) {
g_signal_connect(vseparator, "expose-event",
G_CALLBACK(OnSeparatorExpose), this);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_error_button_ = theme_provider_->BuildChromeButton();
ConnectFolderButtonEvents(sync_error_button_);
gtk_box_pack_start(GTK_BOX(bookmark_hbox_), sync_error_button_,
@@ -336,7 +336,7 @@ void BookmarkBarGtk::Hide(bool animate) {
}
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void BookmarkBarGtk::OnStateChanged() {
// TODO(zork): TODO
}
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.h b/chrome/browser/gtk/bookmark_bar_gtk.h
index bc9b24c..bcd9d24 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.h
+++ b/chrome/browser/gtk/bookmark_bar_gtk.h
@@ -32,7 +32,7 @@ class TabstripOriginProvider;
struct GtkThemeProvider;
class BookmarkBarGtk : public AnimationDelegate,
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
public ProfileSyncServiceObserver,
#endif
public BookmarkModelObserver,
@@ -251,7 +251,7 @@ class BookmarkBarGtk : public AnimationDelegate,
static gboolean OnSeparatorExpose(GtkWidget* widget, GdkEventExpose* event,
BookmarkBarGtk* window);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// ProfileSyncServiceObserver method.
virtual void OnStateChanged();
@@ -307,7 +307,7 @@ class BookmarkBarGtk : public AnimationDelegate,
// The other bookmarks button.
GtkWidget* other_bookmarks_button_;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// The sync re-login indicator which appears when the user needs to re-enter
// credentials in order to continue syncing.
GtkWidget* sync_error_button_;
diff --git a/chrome/browser/gtk/standard_menus.cc b/chrome/browser/gtk/standard_menus.cc
index ce71769..c928fd4 100644
--- a/chrome/browser/gtk/standard_menus.cc
+++ b/chrome/browser/gtk/standard_menus.cc
@@ -93,7 +93,7 @@ struct MenuCreateMaterial standard_app_menu_materials[] = {
{ MENU_NORMAL, IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS, 0, NULL,
GDK_j, GDK_CONTROL_MASK },
{ MENU_SEPARATOR },
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
{ MENU_NORMAL, IDC_SYNC_BOOKMARKS, IDS_SYNC_MY_BOOKMARKS_LABEL},
{ MENU_SEPARATOR },
#endif
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 501d6a5..2c58382 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -758,7 +758,7 @@ ProfileImpl::~ProfileImpl() {
prefs->RemovePrefObserver(prefs::kEnableSpellCheck, this);
prefs->RemovePrefObserver(prefs::kEnableAutoSpellCorrect, this);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_service_.reset();
#endif
@@ -1398,7 +1398,7 @@ void ProfileImpl::StopCreateSessionServiceTimer() {
}
ProfileSyncService* ProfileImpl::GetProfileSyncService() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) {
if (!sync_service_.get())
InitSyncService();
@@ -1409,7 +1409,7 @@ ProfileSyncService* ProfileImpl::GetProfileSyncService() {
}
void ProfileImpl::InitSyncService() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_service_.reset(new ProfileSyncService(this));
sync_service_->Initialize();
#endif
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 2ab6233..a9ac35a 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -501,7 +501,7 @@ class ProfileImpl : public Profile,
scoped_ptr<BookmarkModel> bookmark_bar_model_;
scoped_refptr<WebResourceService> web_resource_service_;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
scoped_ptr<ProfileSyncService> sync_service_;
#endif
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index 0861940..8d63cd7 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -5,7 +5,7 @@
#include "build/build_config.h"
-#ifdef OS_MACOSX
+#if defined(OS_MACOSX)
#include <CoreFoundation/CFNumber.h>
#include <IOKit/IOTypes.h>
#include <IOKit/IOKitLib.h>
@@ -37,7 +37,7 @@ namespace {
// Returns the amount of time since the user last interacted with the computer,
// in milliseconds
int UserIdleTime() {
-#ifdef OS_WIN
+#if defined(OS_WIN)
LASTINPUTINFO last_input_info;
last_input_info.cbSize = sizeof(LASTINPUTINFO);
diff --git a/chrome/browser/sync/engine/syncer_thread_timed_stop.cc b/chrome/browser/sync/engine/syncer_thread_timed_stop.cc
index 2ae8cd5..4bc9916 100644
--- a/chrome/browser/sync/engine/syncer_thread_timed_stop.cc
+++ b/chrome/browser/sync/engine/syncer_thread_timed_stop.cc
@@ -5,7 +5,7 @@
#include "build/build_config.h"
-#ifdef OS_MACOSX
+#if defined(OS_MACOSX)
#include <CoreFoundation/CFNumber.h>
#include <IOKit/IOTypes.h>
#include <IOKit/IOKitLib.h>
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc
index 08ae1c1..f37083c 100644
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_unittest.cc
@@ -935,7 +935,7 @@ TEST_F(SyncerTest, UpdateWithZeroLengthName) {
syncer_->SyncShare();
}
-#ifdef OS_WIN
+#if defined(OS_WIN)
TEST_F(SyncerTest, NameSanitizationWithClientRename) {
ScopedDirLookup dir(syncdb_.manager(), syncdb_.name());
ASSERT_TRUE(dir.good());
diff --git a/chrome/browser/sync/glue/bookmark_model_worker.cc b/chrome/browser/sync/glue/bookmark_model_worker.cc
index fa30466..2425269 100644
--- a/chrome/browser/sync/glue/bookmark_model_worker.cc
+++ b/chrome/browser/sync/glue/bookmark_model_worker.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/glue/bookmark_model_worker.h"
@@ -111,5 +111,4 @@ void BookmarkModelWorker::CallDoWorkAndSignalTask::Run() {
} // namespace browser_sync
-#endif // CHROME_PERSONALIZATION
-
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/bookmark_model_worker.h b/chrome/browser/sync/glue/bookmark_model_worker.h
index 2c4520c..8b47729 100644
--- a/chrome/browser/sync/glue/bookmark_model_worker.h
+++ b/chrome/browser/sync/glue/bookmark_model_worker.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_WORKER_H_
#define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_WORKER_H_
@@ -131,4 +131,4 @@ class BookmarkModelWorker
#endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_WORKER_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/bookmark_model_worker_unittest.cc b/chrome/browser/sync/glue/bookmark_model_worker_unittest.cc
index 879948f..0576732 100644
--- a/chrome/browser/sync/glue/bookmark_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_model_worker_unittest.cc
@@ -1,7 +1,7 @@
// Copyright (c) 2006-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.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "base/thread.h"
#include "chrome/browser/sync/engine/syncapi.h"
@@ -221,4 +221,4 @@ TEST_F(BookmarkModelWorkerTest, HypotheticalManualPumpFlooding) {
core_thread()->Stop();
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/change_processor.cc b/chrome/browser/sync/glue/change_processor.cc
index f5669cb..d90560f 100644
--- a/chrome/browser/sync/glue/change_processor.cc
+++ b/chrome/browser/sync/glue/change_processor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/glue/change_processor.h"
@@ -542,4 +542,4 @@ void ChangeProcessor::SetSyncNodeFavicon(
} // namespace browser_sync
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/change_processor.h b/chrome/browser/sync/glue/change_processor.h
index c5c43f7..355c058 100644
--- a/chrome/browser/sync/glue/change_processor.h
+++ b/chrome/browser/sync/glue/change_processor.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_
#define CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_
@@ -185,4 +185,4 @@ class ChangeProcessor : public BookmarkModelObserver,
#endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_APPLICATOR_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/http_bridge.cc b/chrome/browser/sync/glue/http_bridge.cc
index ebf0c7a..dfda3b5 100644
--- a/chrome/browser/sync/glue/http_bridge.cc
+++ b/chrome/browser/sync/glue/http_bridge.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/glue/http_bridge.h"
@@ -225,4 +225,4 @@ void HttpBridge::OnURLFetchComplete(const URLFetcher *source, const GURL &url,
} // namespace browser_sync
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/http_bridge.h b/chrome/browser/sync/glue/http_bridge.h
index 3055ac8..6ddfcd3 100644
--- a/chrome/browser/sync/glue/http_bridge.h
+++ b/chrome/browser/sync/glue/http_bridge.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_
#define CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_
@@ -182,4 +182,4 @@ class HttpBridgeFactory
#endif // CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/http_bridge_unittest.cc b/chrome/browser/sync/glue/http_bridge_unittest.cc
index 62892af..32e0bc8 100644
--- a/chrome/browser/sync/glue/http_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/http_bridge_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "base/thread.h"
#include "chrome/browser/sync/glue/http_bridge.h"
@@ -207,4 +207,4 @@ TEST_F(HttpBridgeTest, TestExtraRequestHeaders) {
EXPECT_NE(std::string::npos, response.find(test_payload.c_str()));
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/model_associator.cc b/chrome/browser/sync/glue/model_associator.cc
index 29a8f01..8fc1411 100644
--- a/chrome/browser/sync/glue/model_associator.cc
+++ b/chrome/browser/sync/glue/model_associator.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/glue/model_associator.h"
@@ -509,4 +509,4 @@ bool ModelAssociator::LoadAssociations() {
} // namespace browser_sync
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/model_associator.h b/chrome/browser/sync/glue/model_associator.h
index 70fc486..d0db911 100644
--- a/chrome/browser/sync/glue/model_associator.h
+++ b/chrome/browser/sync/glue/model_associator.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCATOR_H_
#define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCATOR_H_
@@ -140,4 +140,4 @@ class ModelAssociator
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCATOR_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 0ff9d6b..0e24c80 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "build/build_config.h"
#include "base/file_version_info.h"
@@ -326,4 +326,4 @@ void SyncBackendHost::Core::SaveChanges() {
} // namespace browser_sync
-#endif
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index 89c581e..b5473f0 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
#define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
@@ -114,7 +114,7 @@ class SyncBackendHost {
// GAIA) has confirmed the username is authentic.
string16 GetAuthenticatedUsername() const;
-#ifdef UNIT_TEST
+#if defined(UNIT_TEST)
// Called from unit test to bypass authentication and initialize the syncapi
// to a state suitable for testing but not production.
void InitializeForTestMode(const std::wstring& test_user) {
@@ -191,7 +191,7 @@ class SyncBackendHost {
sync_api::SyncManager* syncapi() { return syncapi_.get(); }
-#ifdef UNIT_TEST
+#if defined(UNIT_TEST)
// Special form of initialization that does not try and authenticate the
// last known user (since it will fail in test mode) and does some extra
// setup to nudge the syncapi into a useable state.
@@ -290,4 +290,4 @@ class SyncBackendHost {
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/notifier/base/async_dns_lookup.cc b/chrome/browser/sync/notifier/base/async_dns_lookup.cc
index a9fcd0c..869eb23 100644
--- a/chrome/browser/sync/notifier/base/async_dns_lookup.cc
+++ b/chrome/browser/sync/notifier/base/async_dns_lookup.cc
@@ -4,17 +4,20 @@
#include "chrome/browser/sync/notifier/base/async_dns_lookup.h"
-#ifdef POSIX
+#include "build/build_config.h"
+
+#if defined(OS_POSIX)
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <sys/socket.h>
#include <sys/types.h>
-#endif // POSIX
+#endif // defined(OS_POSIX)
#include <vector>
+#include "base/basictypes.h"
#include "base/logging.h"
#include "chrome/browser/sync/notifier/base/nethelpers.h"
#include "chrome/browser/sync/notifier/gaia_auth/inet_aton.h"
diff --git a/chrome/browser/sync/notifier/base/fastalloc.h b/chrome/browser/sync/notifier/base/fastalloc.h
index ed19a53..244a1f8 100644
--- a/chrome/browser/sync/notifier/base/fastalloc.h
+++ b/chrome/browser/sync/notifier/base/fastalloc.h
@@ -38,7 +38,7 @@ class FastAlloc {
private:
void freeBuffer() {
-#ifdef DEBUG
+#if defined(DEBUG)
memset(buffer_, 0xCC, size_ * sizeof(T));
#endif
diff --git a/chrome/browser/sync/notifier/base/nethelpers.h b/chrome/browser/sync/notifier/base/nethelpers.h
index 604e69df..6c859a3 100644
--- a/chrome/browser/sync/notifier/base/nethelpers.h
+++ b/chrome/browser/sync/notifier/base/nethelpers.h
@@ -5,10 +5,12 @@
#ifndef CHROME_BROWSER_SYNC_NOTIFIER_BASE_NETHELPERS_H_
#define CHROME_BROWSER_SYNC_NOTIFIER_BASE_NETHELPERS_H_
-#ifdef POSIX
+#include "base/basictypes.h"
+
+#if defined(OS_POSIX)
#include <cstddef>
#include <netdb.h>
-#elif WIN32
+#elif defined(OS_WIN)
#include <winsock2.h>
#endif
diff --git a/chrome/browser/sync/notifier/base/time.h b/chrome/browser/sync/notifier/base/time.h
index 338ad71..c6b6352 100644
--- a/chrome/browser/sync/notifier/base/time.h
+++ b/chrome/browser/sync/notifier/base/time.h
@@ -21,7 +21,7 @@ const time64 kMaxTime100ns = UINT64_C(9223372036854775807);
// Time difference in 100NS granularity between platform-dependent starting
// time and Jan 1, 1970.
-#ifdef WIN32
+#if defined(OS_WIN)
// On Windows time64 is seconds since Jan 1, 1601.
#define kStart100NsTimeToEpoch (116444736000000000uI64)
#else
diff --git a/chrome/browser/sync/notifier/communicator/mailbox.cc b/chrome/browser/sync/notifier/communicator/mailbox.cc
index ebb32a8..df8d7cf 100644
--- a/chrome/browser/sync/notifier/communicator/mailbox.cc
+++ b/chrome/browser/sync/notifier/communicator/mailbox.cc
@@ -195,7 +195,7 @@ bool MessageThread::unread() const {
return (labels_->find("^u") != labels_->end());
}
-#ifdef _DEBUG
+#if defined(DEBUG)
// Non-debug version is inline and empty.
void MessageThread::AssertValid() const {
assert(thread_id_ != 0);
diff --git a/chrome/browser/sync/notifier/communicator/mailbox.h b/chrome/browser/sync/notifier/communicator/mailbox.h
index feadc86..ae44cb3 100644
--- a/chrome/browser/sync/notifier/communicator/mailbox.h
+++ b/chrome/browser/sync/notifier/communicator/mailbox.h
@@ -105,7 +105,7 @@ class MessageThread {
bool starred() const;
bool unread() const;
-#ifdef _DEBUG
+#if defined(DEBUG)
void AssertValid() const;
#else
inline void AssertValid() const {}
diff --git a/chrome/browser/sync/notifier/gaia_auth/inet_aton.h b/chrome/browser/sync/notifier/gaia_auth/inet_aton.h
index 6a5aee5..29e4dcb 100644
--- a/chrome/browser/sync/notifier/gaia_auth/inet_aton.h
+++ b/chrome/browser/sync/notifier/gaia_auth/inet_aton.h
@@ -7,7 +7,7 @@
#ifndef CHROME_BROWSER_SYNC_NOTIFIER_GAIA_AUTH_INET_ATON_H_
#define CHROME_BROWSER_SYNC_NOTIFIER_GAIA_AUTH_INET_ATON_H_
-#ifdef WIN32
+#if defined(OS_WIN)
int inet_aton(const char* cp, struct in_addr* inp);
#endif
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
index fd25620..e4c8061 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/sync/notifier/listener/subscribe_task.h"
#include "chrome/browser/sync/protocol/service_constants.h"
#include "talk/base/thread.h"
-#ifdef WIN32
+#if defined(OS_WIN)
#include "talk/base/win32socketserver.h"
#endif
#include "talk/xmpp/xmppclient.h"
@@ -41,7 +41,7 @@ void MediatorThreadImpl::Run() {
PlatformThread::SetName("SyncEngine_MediatorThread");
// For win32, this sets up the win32socketserver. Note that it needs to
// dispatch windows messages since that is what the win32 socket server uses.
-#ifdef WIN32
+#if defined(OS_WIN)
scoped_ptr<talk_base::SocketServer> socket_server(
new talk_base::Win32SocketServer(this));
talk_base::SocketServer* old_socket_server = socketserver();
@@ -62,7 +62,7 @@ void MediatorThreadImpl::Run() {
ProcessMessages(talk_base::kForever);
-#ifdef WIN32
+#if defined(OS_WIN)
set_socketserver(old_socket_server);
socket_server.reset();
#endif
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 2efba68..08d486c 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/profile_sync_service.h"
#include <stack>
@@ -428,4 +428,4 @@ bool ProfileSyncService::ShouldPushChanges() {
return change_processor_->IsRunning();
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 9eedbef..eca2480 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
#define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
@@ -314,4 +314,4 @@ class ProfileSyncService : public NotificationObserver,
#endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index b2062b5..cef0204 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include <stack>
#include <vector>
@@ -1273,4 +1273,4 @@ TEST_F(ProfileSyncServiceTestWithData, RecoverAfterDeletingSyncDataDirectory) {
ExpectModelMatch();
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 2784572..4b5d241 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/sync_setup_flow.h"
@@ -301,4 +301,4 @@ SyncSetupFlow* SyncSetupFlow::Run(ProfileSyncService* service,
return flow;
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h
index 32e3db1..20668ee 100644
--- a/chrome/browser/sync/sync_setup_flow.h
+++ b/chrome/browser/sync/sync_setup_flow.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
#define CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
@@ -186,4 +186,4 @@ class FlowHandler : public DOMMessageHandler {
};
#endif // CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc
index 7d00ab9..2027bdb 100644
--- a/chrome/browser/sync/sync_setup_wizard.cc
+++ b/chrome/browser/sync/sync_setup_wizard.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/sync_setup_wizard.h"
@@ -196,4 +196,4 @@ SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun(
return result;
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_setup_wizard_unittest.cc b/chrome/browser/sync/sync_setup_wizard_unittest.cc
index 3a04746..b4cb572 100644
--- a/chrome/browser/sync/sync_setup_wizard_unittest.cc
+++ b/chrome/browser/sync/sync_setup_wizard_unittest.cc
@@ -1,7 +1,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "testing/gtest/include/gtest/gtest.h"
@@ -373,4 +373,4 @@ TEST_F(SyncSetupWizardTest, DiscreteRun) {
EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled());
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_status_ui_helper.cc b/chrome/browser/sync/sync_status_ui_helper.cc
index b642d3c..abffddc 100644
--- a/chrome/browser/sync/sync_status_ui_helper.cc
+++ b/chrome/browser/sync/sync_status_ui_helper.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/browser/sync/sync_status_ui_helper.h"
@@ -114,4 +114,4 @@ SyncStatusUIHelper::MessageType SyncStatusUIHelper::GetLabels(
return result_type;
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/sync_status_ui_helper.h b/chrome/browser/sync/sync_status_ui_helper.h
index 6241ead..f0d874b 100644
--- a/chrome/browser/sync/sync_status_ui_helper.h
+++ b/chrome/browser/sync/sync_status_ui_helper.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_
#define CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_
@@ -31,4 +31,4 @@ class SyncStatusUIHelper {
};
#endif // CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc
index d693fb0..fd1eb34 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.cc
+++ b/chrome/browser/sync/syncable/directory_backing_store.cc
@@ -6,7 +6,7 @@
#include "build/build_config.h"
-#ifdef OS_MACOSX
+#if defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -75,7 +75,7 @@ static void PathNameMatch16WithEscape(sqlite3_context* context,
#endif
static void RegisterPathNameCollate(sqlite3* dbhandle) {
-#ifdef OS_WIN
+#if defined(OS_WIN)
const int collate = SQLITE_UTF16;
#else
const int collate = SQLITE_UTF8;
@@ -93,7 +93,7 @@ static void RegisterPathNameMatch(sqlite3* dbhandle) {
// comparison on mac, so that would have to be fixed if
// we really wanted to use PathNameMatch on mac/linux w/ the
// same pattern strings as we do on windows.
-#ifdef OS_WIN
+#if defined(OS_WIN)
CHECK(SQLITE_OK == sqlite3_create_function(dbhandle, "like",
2, SQLITE_ANY, NULL, &PathNameMatch16, NULL, NULL));
CHECK(SQLITE_OK == sqlite3_create_function(dbhandle, "like",
diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
index 4d7b1c0..a182303 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/chrome/browser/sync/syncable/syncable.cc
@@ -7,12 +7,12 @@
#include "build/build_config.h"
#include <sys/stat.h>
-#ifdef OS_POSIX
+#if defined(OS_POSIX)
#include <sys/time.h>
#endif
#include <sys/types.h>
#include <time.h>
-#ifdef OS_MACOSX
+#if defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
#elif defined(OS_WIN)
#include <shlwapi.h> // for PathMatchSpec
@@ -70,7 +70,7 @@ using std::string;
namespace syncable {
int64 Now() {
-#ifdef OS_WIN
+#if defined(OS_WIN)
FILETIME filetime;
SYSTEMTIME systime;
GetSystemTime(&systime);
@@ -94,7 +94,7 @@ int64 Now() {
// Callback for sqlite3
int ComparePathNames16(void*, int a_bytes, const void* a, int b_bytes,
const void* b) {
-#ifdef OS_WIN
+#if defined(OS_WIN)
DCHECK_EQ(0, a_bytes % 2);
DCHECK_EQ(0, b_bytes % 2);
int result = CompareString(LOCALE_INVARIANT, NORM_IGNORECASE,
@@ -238,7 +238,7 @@ Directory::~Directory() {
}
BOOL PathNameMatch(const PathString& pathname, const PathString& pathspec) {
-#ifdef OS_WIN
+#if defined(OS_WIN)
// Note that if we go Vista only this is easier:
// http://msdn2.microsoft.com/en-us/library/ms628611.aspx
@@ -1729,7 +1729,7 @@ void DBName::MakeNoncollidingForEntry(BaseTransaction* trans,
PathString GetFullPath(BaseTransaction* trans, const Entry& e) {
PathString result;
-#ifdef COMPILER_MSVC
+#if defined(COMPILER_MSVC)
result.reserve(MAX_PATH);
#endif
ReverseAppend(e.Get(NAME), &result);
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index f117aaf..db5bc08 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -1088,7 +1088,7 @@ TEST(Syncable, ComparePathNames) {
}
}
-#ifdef OS_WIN
+#if defined(OS_WIN)
TEST(Syncable, PathNameMatch) {
// basic stuff, not too many otherwise we're testing the os.
EXPECT_TRUE(PathNameMatch(PSTR("bob"), PSTR("bob")));
@@ -1111,7 +1111,7 @@ TEST(Syncable, PathNameMatch) {
// other whitespace should give no matches.
EXPECT_FALSE(PathNameMatch(PSTR("bob"), PSTR("\tbob")));
}
-#endif // OS_WIN
+#endif // defined(OS_WIN)
void FakeSync(MutableEntry* e, const char* fake_id) {
e->Put(IS_UNSYNCED, false);
diff --git a/chrome/browser/sync/util/character_set_converters_unittest.cc b/chrome/browser/sync/util/character_set_converters_unittest.cc
index b1aa604..6274a1d 100644
--- a/chrome/browser/sync/util/character_set_converters_unittest.cc
+++ b/chrome/browser/sync/util/character_set_converters_unittest.cc
@@ -35,7 +35,7 @@ TEST_F(CharacterSetConverterTest, ASCIIConversionTest) {
ToPathString to_16(ascii);
ASSERT_TRUE(to_16.good());
ASSERT_TRUE(PathString(wide) == to_16.get_string16());
-#ifdef OS_WIN
+#if defined(OS_WIN)
// On Linux, PathString is already UTF8
ASSERT_EQ(string(ascii), static_cast<string>(ToUTF8(wide)));
#endif
@@ -44,7 +44,7 @@ TEST_F(CharacterSetConverterTest, ASCIIConversionTest) {
// ASSERT_TRUE(wide == ToPathString(utf8).get_string16());
}
-#ifdef OS_WIN
+#if defined(OS_WIN)
// On Linux, PathString is already UTF8
TEST_F(CharacterSetConverterTest, UnicodeConversionText) {
// Source data obtained by running od -b on files saved in utf-8 and unicode
@@ -78,7 +78,7 @@ TEST_F(CharacterSetConverterTest, UnicodeConversionText) {
ASSERT_TRUE(wide == to_16.get_string16());
ASSERT_EQ(string(utf8), reinterpret_cast<const string&>(ToUTF8(wide)));
}
-#endif
+#endif // defined(OS_WIN)
TEST_F(CharacterSetConverterTest, AppendUTF8Tests) {
PathString one = PSTR("one");
@@ -108,7 +108,7 @@ TEST_F(CharacterSetConverterTest, AppendPathStringTests) {
ASSERT_TRUE(out == PathString(PSTR("onetwothree")));
}
-#ifdef OS_WIN
+#if defined(OS_WIN)
namespace {
// See http://en.wikipedia.org/wiki/UTF-16 for an explanation of UTF16.
// For a test case we use the UTF-8 and UTF-16 encoding of char 119070
diff --git a/chrome/browser/sync/util/compat_file.h b/chrome/browser/sync/util/compat_file.h
index a2bbf78..011dafe 100644
--- a/chrome/browser/sync/util/compat_file.h
+++ b/chrome/browser/sync/util/compat_file.h
@@ -20,7 +20,7 @@ extern const PathChar* const kPathSeparator;
// Returns 0 on success, non-zero on failure.
int PathRemove(const PathString& path);
-#ifdef OS_WIN
+#if defined(OS_WIN)
inline int PathRemove(const PathString& path) {
return _wremove(path.c_str());
}
diff --git a/chrome/browser/sync/util/compat_file_posix.cc b/chrome/browser/sync/util/compat_file_posix.cc
index 62ba56f..f84a379e6 100644
--- a/chrome/browser/sync/util/compat_file_posix.cc
+++ b/chrome/browser/sync/util/compat_file_posix.cc
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#if !defined(POSIX)
+#include "build/build_config.h"
+
+#if !defined(OS_POSIX)
#error Compile this file on Mac OS X or Linux only.
#endif
diff --git a/chrome/browser/sync/util/event_sys-inl.h b/chrome/browser/sync/util/event_sys-inl.h
index c2f3b44..320a6f93 100644
--- a/chrome/browser/sync/util/event_sys-inl.h
+++ b/chrome/browser/sync/util/event_sys-inl.h
@@ -118,7 +118,7 @@ class EventChannel {
// Make sure all the listeners have been disconnected. Otherwise, they
// will try to call RemoveListener() at a later date.
-#ifdef DEBUG
+#if defined(DEBUG)
AutoLock lock(listeners_mutex_);
for (typename Listeners::iterator i = listeners_.begin();
i != listeners_.end(); ++i) {
diff --git a/chrome/browser/sync/util/event_sys_unittest.cc b/chrome/browser/sync/util/event_sys_unittest.cc
index c39ea9a..9afd64b 100644
--- a/chrome/browser/sync/util/event_sys_unittest.cc
+++ b/chrome/browser/sync/util/event_sys_unittest.cc
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/platform_thread.h"
#include "base/port.h"
#include "build/build_config.h"
#include "chrome/browser/sync/util/event_sys-inl.h"
@@ -223,12 +224,7 @@ class ThreadTester : public EventListener<TestEvent>,
remove_event_mutex_.Release();
remove_event_.Broadcast();
- // Windows and posix use different functions to sleep.
-#ifdef OS_WIN
- Sleep(1);
-#else
- sleep(1);
-#endif
+ PlatformThread::Sleep(1);
for (size_t i = 0; i < threads_.size(); i++) {
if (threads_[i].completed)
diff --git a/chrome/browser/sync/util/highres_timer_unittest.cc b/chrome/browser/sync/util/highres_timer_unittest.cc
index 0d3a905..2257262 100644
--- a/chrome/browser/sync/util/highres_timer_unittest.cc
+++ b/chrome/browser/sync/util/highres_timer_unittest.cc
@@ -5,6 +5,7 @@
// High resolution timer unit tests.
#include "base/basictypes.h"
+#include "base/platform_thread.h"
#include "build/build_config.h"
#include "chrome/browser/sync/util/highres_timer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,20 +32,10 @@ TEST(HighresTimer, DISABLED_SecondClock) {
HighresTimer timer;
EXPECT_TRUE(0 == timer.GetElapsedSec());
-#ifdef OS_WIN
- ::Sleep(250);
-#else
- struct timespec ts1 = {0, 250000000};
- nanosleep(&ts1, 0);
-#endif
+ PlatformThread::Sleep(250);
EXPECT_TRUE(0 == timer.GetElapsedSec());
EXPECT_TRUE(230 <= timer.GetElapsedMs());
EXPECT_TRUE(270 >= timer.GetElapsedMs());
-#ifdef OS_WIN
- ::Sleep(251);
-#else
- struct timespec ts2 = {0, 251000000};
- nanosleep(&ts2, 0);
-#endif
+ PlatformThread::Sleep(251);
EXPECT_TRUE(1 == timer.GetElapsedSec());
}
diff --git a/chrome/browser/sync/util/path_helpers_unittest.cc b/chrome/browser/sync/util/path_helpers_unittest.cc
index 827e2c3..62359e1 100644
--- a/chrome/browser/sync/util/path_helpers_unittest.cc
+++ b/chrome/browser/sync/util/path_helpers_unittest.cc
@@ -65,7 +65,7 @@ TEST(PathHelpersTest, PathStrutil) {
}
TEST(PathHelpersTest, SanitizePathComponent) {
-#ifdef OS_WIN
+#if defined(OS_WIN)
EXPECT_EQ(MakePathComponentOSLegal(L"bar"), L"");
EXPECT_EQ(MakePathComponentOSLegal(L"bar <"), L"bar");
EXPECT_EQ(MakePathComponentOSLegal(L"bar.<"), L"bar");
@@ -117,7 +117,7 @@ TEST(PathHelpersTest, SanitizePathComponent) {
EXPECT_EQ(MakePathComponentOSLegal(L"<.<"), L"~1");
EXPECT_EQ(MakePathComponentOSLegal(L"<.<txt"), L".txt");
EXPECT_EQ(MakePathComponentOSLegal(L"txt<.<"), L"txt");
-#else // OS_WIN
+#else // !defined(OS_WIN)
EXPECT_EQ(MakePathComponentOSLegal("bar"), "");
EXPECT_EQ(MakePathComponentOSLegal("b"), "");
@@ -126,7 +126,7 @@ TEST(PathHelpersTest, SanitizePathComponent) {
EXPECT_EQ(MakePathComponentOSLegal("/"), ":");
EXPECT_EQ(MakePathComponentOSLegal(":"), "");
-#endif // OS_WIN
+#endif // defined(OS_WIN)
}
} // namespace syncable
diff --git a/chrome/browser/sync/util/query_helpers.cc b/chrome/browser/sync/util/query_helpers.cc
index 34dc79f..c27a877 100644
--- a/chrome/browser/sync/util/query_helpers.cc
+++ b/chrome/browser/sync/util/query_helpers.cc
@@ -65,7 +65,7 @@ int SqliteOpen(PathString filename, sqlite3** db) {
(filename.c_str(), db);
LOG_IF(ERROR, SQLITE_OK != result) << "Error opening " << filename << ": "
<< result;
-#ifdef OS_WIN
+#if defined(OS_WIN)
if (SQLITE_OK == result) {
// Make sure we mark the db file as not indexed so since if any other app
// opens it, it can break our db locking.
@@ -76,12 +76,12 @@ int SqliteOpen(PathString filename, sqlite3** db) {
attrs = attrs | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
SetFileAttributes(filename.c_str(), attrs);
}
-#endif // OS_WIN
+#endif // defined(OS_WIN)
// Be patient as we set pragmas.
sqlite3_busy_timeout(*db, numeric_limits<int>::max());
-#ifndef DISABLE_SQLITE_FULL_FSYNC
+#if !defined(DISABLE_SQLITE_FULL_FSYNC)
ExecOrDie(*db, "PRAGMA fullfsync = 1");
-#endif // DISABLE_SQLITE_FULL_FSYNC
+#endif // !defined(DISABLE_SQLITE_FULL_FSYNC)
ExecOrDie(*db, "PRAGMA synchronous = 2");
sqlite3_busy_timeout(*db, 0);
return SQLITE_OK;
diff --git a/chrome/browser/sync/util/sync_types.h b/chrome/browser/sync/util/sync_types.h
index 26469cc..71b9c42 100644
--- a/chrome/browser/sync/util/sync_types.h
+++ b/chrome/browser/sync/util/sync_types.h
@@ -13,7 +13,7 @@
#include "build/build_config.h"
// TODO(timsteele): Use base/file_path.h instead of PathString.
-#ifdef OS_WIN
+#if defined(OS_WIN)
#define PATHSTRING_IS_STD_STRING 0
typedef std::wstring PathString;
diff --git a/chrome/browser/sync/util/user_settings.cc b/chrome/browser/sync/util/user_settings.cc
index a8ab972..1c867a6 100644
--- a/chrome/browser/sync/util/user_settings.cc
+++ b/chrome/browser/sync/util/user_settings.cc
@@ -180,7 +180,7 @@ bool UserSettings::Init(const PathString& settings_path) {
}
ExecOrDie(dbhandle.get(), "COMMIT TRANSACTION");
}
-#ifdef OS_WIN
+#if defined(OS_WIN)
// Do not index this file. Scanning can occur every time we close the file,
// which causes long delays in SQLite's file locking.
const DWORD attrs = GetFileAttributes(settings_path.c_str());
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 5f5007e..5eba994 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -112,7 +112,7 @@ static const SkColor kInstructionsColor = SkColorSetRGB(128, 128, 142);
// Tag for the 'Other bookmarks' button.
static const int kOtherFolderButtonTag = 1;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Tag for the sync error button.
static const int kSyncErrorButtonTag = 2;
#endif
@@ -368,7 +368,7 @@ BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser)
other_bookmarked_button_(NULL),
model_changed_listener_(NULL),
show_folder_drop_menu_task_(NULL),
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_error_button_(NULL),
sync_service_(NULL),
#endif
@@ -377,7 +377,7 @@ BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser)
bookmarks_separator_view_(NULL),
browser_(browser),
throbbing_view_(NULL) {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (profile->GetProfileSyncService()) {
// Obtain a pointer to the profile sync service and add our instance as an
// observer.
@@ -402,9 +402,9 @@ BookmarkBarView::~BookmarkBarView() {
model_->RemoveObserver(this);
StopShowFolderDropMenuTimer();
-#ifdef CHROME_PERSONALIZATION
-if (sync_service_)
- sync_service_->RemoveObserver(this);
+#if defined(BROWSER_SYNC)
+ if (sync_service_)
+ sync_service_->RemoveObserver(this);
#endif
}
@@ -464,7 +464,7 @@ gfx::Size BookmarkBarView::GetMinimumSize() {
}
int sync_error_total_width = 0;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
gfx::Size sync_error_button_pref = sync_error_button_->GetPreferredSize();
if (ShouldShowSyncErrorButton())
sync_error_total_width += kButtonPadding + sync_error_button_pref.width();
@@ -716,7 +716,7 @@ void BookmarkBarView::SetAccessibleName(const std::wstring& name) {
accessible_name_.assign(name);
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void BookmarkBarView::OnStateChanged() {
// When the sync state changes, it is sufficient to invoke View::Layout since
// during layout we query the profile sync service and determine whether the
@@ -730,7 +730,7 @@ void BookmarkBarView::OnStateChanged() {
Layout();
SchedulePaint();
}
-#endif
+#endif // defined(BROWSER_SYNC)
void BookmarkBarView::OnFullscreenToggled(bool fullscreen) {
if (!fullscreen)
@@ -811,7 +811,7 @@ void BookmarkBarView::Init() {
other_bookmarked_button_ = CreateOtherBookmarkedButton();
AddChildView(other_bookmarked_button_);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_error_button_ = CreateSyncErrorButton();
AddChildView(sync_error_button_);
#endif
@@ -870,7 +870,7 @@ MenuButton* BookmarkBarView::CreateOverflowButton() {
}
int BookmarkBarView::GetBookmarkButtonCount() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// We contain at least four non-bookmark button views: other bookmarks,
// bookmarks separator, chevrons (for overflow), the instruction label and
// the sync error button.
@@ -1125,7 +1125,7 @@ void BookmarkBarView::RunMenu(views::View* view, const gfx::Point& pt) {
void BookmarkBarView::ButtonPressed(views::Button* sender,
const views::Event& event) {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Show the login wizard if the user clicked the re-login button.
if (sender->tag() == kSyncErrorButtonTag) {
DCHECK(sender == sync_error_button_);
@@ -1589,21 +1589,17 @@ gfx::Size BookmarkBarView::LayoutItems(bool compute_bounds_only) {
gfx::Size bookmarks_separator_pref =
bookmarks_separator_view_->GetPreferredSize();
-#ifdef CHROME_PERSONALIZATION
+ int sync_error_total_width = 0;
+#if defined(BROWSER_SYNC)
gfx::Size sync_error_button_pref = sync_error_button_->GetPreferredSize();
const bool should_show_sync_error_button = ShouldShowSyncErrorButton();
- int sync_error_total_width = 0;
if (should_show_sync_error_button) {
sync_error_total_width += kButtonPadding + sync_error_button_pref.width();
}
- const int max_x = width - other_bookmarked_pref.width() - kButtonPadding -
- overflow_pref.width() - kButtonPadding -
- bookmarks_separator_pref.width() - sync_error_total_width;
-#else
- const int max_x = width - other_bookmarked_pref.width() - kButtonPadding -
- overflow_pref.width() - kButtonPadding -
- bookmarks_separator_pref.width();
#endif
+ const int max_x = width - other_bookmarked_pref.width() - kButtonPadding -
+ overflow_pref.width() - kButtonPadding -
+ bookmarks_separator_pref.width() - sync_error_total_width;
// Next, layout out the buttons. Any buttons that are placed beyond the
// visible region and made invisible.
@@ -1669,7 +1665,7 @@ gfx::Size BookmarkBarView::LayoutItems(bool compute_bounds_only) {
}
x += other_bookmarked_pref.width() + kButtonPadding;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Set the real bounds of the sync error button only if it needs to appear on
// the bookmarks bar.
if (should_show_sync_error_button) {
@@ -1684,7 +1680,7 @@ gfx::Size BookmarkBarView::LayoutItems(bool compute_bounds_only) {
sync_error_button_->SetBounds(x, y, 0, height);
sync_error_button_->SetVisible(false);
}
-#endif
+#endif // defined(BROWSER_SYNC)
// Set the preferred size computed so far.
if (compute_bounds_only) {
@@ -1704,7 +1700,7 @@ gfx::Size BookmarkBarView::LayoutItems(bool compute_bounds_only) {
return prefsize;
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// The sync state reported by the profile sync service determines whether or
// not the re-login indicator button should be visible.
bool BookmarkBarView::ShouldShowSyncErrorButton() {
@@ -1738,5 +1734,5 @@ views::TextButton* BookmarkBarView::CreateSyncErrorButton() {
*ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
return sync_error_button;
}
-#endif
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h
index 90295fc..c7008fb7 100644
--- a/chrome/browser/views/bookmark_bar_view.h
+++ b/chrome/browser/views/bookmark_bar_view.h
@@ -35,7 +35,7 @@ class MenuItemView;
// waits until the HistoryService for the profile has been loaded before
// creating the BookmarkModel.
class BookmarkBarView : public DetachableToolbarView,
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
public ProfileSyncServiceObserver,
#endif
public BookmarkModelObserver,
@@ -117,7 +117,7 @@ class BookmarkBarView : public DetachableToolbarView,
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
virtual void SetAccessibleName(const std::wstring& name);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// ProfileSyncServiceObserver method.
virtual void OnStateChanged();
#endif
@@ -403,7 +403,7 @@ class BookmarkBarView : public DetachableToolbarView,
// desired bounds. If |compute_bounds_only| = FALSE, the bounds are set.
gfx::Size LayoutItems(bool compute_bounds_only);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Determines whether the sync error button should appear on the bookmarks
// bar.
bool ShouldShowSyncErrorButton();
@@ -443,7 +443,7 @@ class BookmarkBarView : public DetachableToolbarView,
// Used to track drops on the bookmark bar view.
scoped_ptr<DropInfo> drop_info_;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// The sync re-login indicator which appears when the user needs to re-enter
// credentials in order to continue syncing.
views::TextButton* sync_error_button_;
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index 1cad2735..959e916 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -21,7 +21,9 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/importer/importer.h"
#include "chrome/browser/metrics/user_metrics.h"
+#include "chrome/browser/options_window.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/sync/sync_status_ui_helper.h"
#include "chrome/browser/views/bookmark_editor_view.h"
#include "chrome/browser/views/bookmark_folder_tree_view.h"
#include "chrome/browser/views/bookmark_table_view.h"
@@ -31,20 +33,15 @@
#include "grit/locale_settings.h"
#include "skia/ext/skia_utils.h"
#include "third_party/skia/include/core/SkShader.h"
-#include "views/grid_layout.h"
#include "views/controls/button/menu_button.h"
-#include "views/controls/menu/menu_item_view.h"
#include "views/controls/label.h"
+#include "views/controls/menu/menu_item_view.h"
#include "views/controls/single_split_view.h"
+#include "views/grid_layout.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
#include "views/window/window.h"
-#if defined(CHROME_PERSONALIZATION)
-#include "chrome/browser/options_window.h"
-#include "chrome/browser/sync/sync_status_ui_helper.h"
-#endif
-
// If non-null, there is an open editor and this is the window it is contained
// in it.
static views::Window* open_window = NULL;
@@ -168,7 +165,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
: profile_(profile->GetOriginalProfile()),
table_view_(NULL),
tree_view_(NULL),
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
sync_status_button_(NULL),
sync_service_(NULL),
#endif
@@ -210,7 +207,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
0, views::GridLayout::USE_PREF, 0, 0);
column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
0, views::GridLayout::USE_PREF, 0, 0);
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
0, views::GridLayout::USE_PREF, 0, 0);
#endif
@@ -229,7 +226,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
layout->StartRow(0, top_id);
layout->AddView(organize_menu_button);
layout->AddView(tools_menu_button);
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
sync_status_button_ = new views::TextButton(this, std::wstring());
layout->AddView(sync_status_button_);
#endif
@@ -249,7 +246,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
if (!bookmark_model->IsLoaded())
bookmark_model->AddObserver(this);
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
if (profile->GetProfileSyncService()) {
sync_service_ = profile_->GetProfileSyncService();
sync_service_->AddObserver(this);
@@ -274,7 +271,7 @@ BookmarkManagerView::~BookmarkManagerView() {
manager = NULL;
open_window = NULL;
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
if (sync_service_)
sync_service_->RemoveObserver(this);
#endif
@@ -386,7 +383,7 @@ void BookmarkManagerView::WindowClosing() {
prefs::kBookmarkManagerSplitLocation, split_view_->divider_offset());
}
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
void BookmarkManagerView::OnStateChanged() {
UpdateSyncStatus();
}
@@ -524,7 +521,7 @@ void BookmarkManagerView::OnTreeViewKeyDown(unsigned short virtual_keycode) {
}
}
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
void BookmarkManagerView::ButtonPressed(views::Button* sender,
const views::Event& event) {
if (sender == sync_status_button_) {
@@ -835,7 +832,7 @@ void BookmarkManagerView::ShowExportBookmarksFileChooser() {
reinterpret_cast<void*>(IDS_BOOKMARK_MANAGER_EXPORT_MENU));
}
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
void BookmarkManagerView::UpdateSyncStatus() {
DCHECK(sync_service_);
std::wstring status_label;
@@ -865,4 +862,4 @@ void BookmarkManagerView::OpenSyncMyBookmarksDialog() {
ProfileSyncService::START_FROM_BOOKMARK_MANAGER);
}
}
-#endif
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h
index cfbc33a..608b8c7 100644
--- a/chrome/browser/views/bookmark_manager_view.h
+++ b/chrome/browser/views/bookmark_manager_view.h
@@ -43,7 +43,7 @@ class BookmarkManagerView : public views::View,
public views::TreeViewController,
public views::ViewMenuDelegate,
public views::WindowDelegate,
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
public views::ButtonListener,
public ProfileSyncServiceObserver,
#endif
@@ -94,7 +94,7 @@ class BookmarkManagerView : public views::View,
//virtual bool ShouldShowWindowIcon() const { return true; }
virtual void WindowClosing();
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
// ProfileSyncServiceObserver method.
virtual void OnStateChanged();
#endif
@@ -118,7 +118,7 @@ class BookmarkManagerView : public views::View,
virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view);
virtual void OnTreeViewKeyDown(unsigned short virtual_keycode);
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
// views::ButtonListener method.
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
#endif
@@ -213,7 +213,7 @@ class BookmarkManagerView : public views::View,
void ShowImportBookmarksFileChooser();
void ShowExportBookmarksFileChooser();
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
void UpdateSyncStatus();
void OpenSyncMyBookmarksDialog();
#endif
@@ -229,7 +229,7 @@ class BookmarkManagerView : public views::View,
// Import/export file dialog.
scoped_refptr<SelectFileDialog> select_file_dialog_;
-#if defined(CHROME_PERSONALIZATION)
+#if defined(BROWSER_SYNC)
// The sync status button that notifies the user about the current status of
// bookmarks synchronization.
views::TextButton* sync_status_button_;
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index a3df28c..cc56a6d 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -35,7 +35,7 @@ namespace {
const int kPasswordSavingRadioGroup = 1;
const int kFormAutofillRadioGroup = 2;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Background color for the status label when it's showing an error.
static const SkColor kSyncLabelErrorBgColor = SkColorSetRGB(0xff, 0x9a, 0x9a);
@@ -59,7 +59,7 @@ ContentPageView::ContentPageView(Profile* profile)
browsing_data_group_(NULL),
import_button_(NULL),
clear_data_button_(NULL),
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
sync_group_(NULL),
sync_status_label_(NULL),
sync_action_link_(NULL),
@@ -67,7 +67,7 @@ ContentPageView::ContentPageView(Profile* profile)
sync_service_(NULL),
#endif
OptionsPageView(profile) {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (profile->GetProfileSyncService()) {
sync_service_ = profile->GetProfileSyncService();
sync_service_->AddObserver(this);
@@ -76,7 +76,7 @@ ContentPageView::ContentPageView(Profile* profile)
}
ContentPageView::~ContentPageView() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (sync_service_)
sync_service_->RemoveObserver(this);
#endif
@@ -125,7 +125,7 @@ void ContentPageView::ButtonPressed(
GetWindow()->GetNativeWindow(),
gfx::Rect(),
new ClearBrowsingDataView(profile()))->Show();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
} else if (sender == sync_start_stop_button_) {
DCHECK(sync_service_);
@@ -157,7 +157,7 @@ void ContentPageView::LinkActivated(views::Link* source, int event_flags) {
GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
return;
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
DCHECK_EQ(source, sync_action_link_);
DCHECK(sync_service_);
sync_service_->ShowLoginDialog();
@@ -180,7 +180,7 @@ void ContentPageView::InitControlLayout() {
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::USE_PREF, 0, 0);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (sync_service_) {
layout->StartRow(0, single_column_view_set_id);
InitSyncGroup();
@@ -243,7 +243,7 @@ void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) {
// ContentsPageView, views::View overrides:
void ContentPageView::Layout() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (is_initialized())
UpdateSyncControls();
#endif
@@ -255,7 +255,7 @@ void ContentPageView::Layout() {
0, 0, passwords_group_->GetContentsWidth(), 0);
browsing_data_label_->SetBounds(
0, 0, browsing_data_group_->GetContentsWidth(), 0);
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (is_initialized()) {
sync_status_label_->SetBounds(
0, 0, sync_group_->GetContentsWidth(), 0);
@@ -268,7 +268,7 @@ void ContentPageView::Layout() {
///////////////////////////////////////////////////////////////////////////////
// ContentsPageView, ProfileSyncServiceObserver implementation:
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void ContentPageView::OnStateChanged() {
// If the UI controls are not yet initialized, then don't do anything. This
// can happen if the Options dialog is up, but the Content tab is not yet
@@ -437,7 +437,7 @@ void ContentPageView::OnConfirmMessageAccept() {
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
}
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void ContentPageView::InitSyncGroup() {
sync_status_label_ = new views::Label;
sync_status_label_->SetMultiLine(true);
@@ -502,4 +502,4 @@ void ContentPageView::UpdateSyncControls() {
}
}
-#endif
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/browser/views/options/content_page_view.h b/chrome/browser/views/options/content_page_view.h
index e3902c4..91febde 100644
--- a/chrome/browser/views/options/content_page_view.h
+++ b/chrome/browser/views/options/content_page_view.h
@@ -27,7 +27,7 @@ class PrefService;
// ContentPageView
class ContentPageView : public OptionsPageView,
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
public views::LinkController,
public ProfileSyncServiceObserver,
#endif
@@ -46,7 +46,7 @@ class ContentPageView : public OptionsPageView,
// ConfirmMessageBoxObserver implementation.
virtual void OnConfirmMessageAccept();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// ProfileSyncServiceObserver method.
virtual void OnStateChanged();
#endif
@@ -60,7 +60,7 @@ class ContentPageView : public OptionsPageView,
virtual void Layout();
private:
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Updates various sync controls based on the current sync state.
void UpdateSyncControls();
@@ -78,7 +78,7 @@ class ContentPageView : public OptionsPageView,
void InitFormAutofillGroup();
void InitBrowsingDataGroup();
void InitThemesGroup();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
void InitSyncGroup();
#endif
@@ -104,7 +104,7 @@ class ContentPageView : public OptionsPageView,
views::NativeButton* import_button_;
views::NativeButton* clear_data_button_;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Controls for the Sync group.
OptionsGroupView* sync_group_;
views::Label* sync_status_label_;
@@ -116,7 +116,7 @@ class ContentPageView : public OptionsPageView,
BooleanPrefMember ask_to_save_form_autofill_;
StringPrefMember is_using_default_theme_;
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
// Cached pointer to ProfileSyncService, if it exists. Kept up to date
// and NULL-ed out on destruction.
ProfileSyncService* sync_service_;
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 0ec9557..42e2f531 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -1132,7 +1132,7 @@ void ToolbarView::CreateAppMenu() {
}
app_menu_contents_->AddSeparator();
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) {
std::wstring label;
std::wstring link;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 6f541b19..f58b854 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -158,9 +158,9 @@
}], # OS=="mac"
['OS=="win" or OS=="mac"', {
# Whether or not browser sync code is built in.
- 'chrome_personalization%': 1,
+ 'browser_sync%': 1,
}, {
- 'chrome_personalization%': 0,
+ 'browser_sync%': 0,
}], # OS=="win"
['target_arch=="ia32"', {
'nacl_defines': [
@@ -206,9 +206,11 @@
['OS=="linux" and toolkit_views==1', {'sources/': [
['include', '_views\\.cc$'],
]}],
- ['(OS=="win" or OS=="mac") and chrome_personalization==1', {
- 'defines': ['CHROME_PERSONALIZATION=1'],
- }], # chrome_personalization==1
+ ['browser_sync==0', {'sources/': [
+ ['exclude', '^(browser/sync|browser/views/sync).*cc$'],
+ ]}, {'defines': [
+ 'BROWSER_SYNC=1',
+ ]}],
],
},
'targets': [
@@ -4782,7 +4784,7 @@
'common/net/url_util_unittest.cc',
],
}],
- ['chrome_personalization==1', {
+ ['browser_sync==1', {
'sources!': [
'browser/sync/profile_sync_service_unittest.cc',
]
@@ -4835,7 +4837,7 @@
'target_name': 'syncapi',
'conditions': [
- ['chrome_personalization==0', {
+ ['browser_sync==0', {
# Empty target.
'type': 'none',
}, {
@@ -6521,7 +6523,7 @@
},
]
}],
- ['chrome_personalization==1', {
+ ['browser_sync==1', {
# These targets get built only where sync is supported.
'targets': [
{
@@ -6891,7 +6893,7 @@
}],
],
},
- ], # targets when chrome_personalization==1
+ ], # targets when browser_sync==1
}],
], # 'conditions'
}
diff --git a/chrome/test/live_sync/bookmark_model_verifier.cc b/chrome/test/live_sync/bookmark_model_verifier.cc
index a827f10..b1d807b 100644
--- a/chrome/test/live_sync/bookmark_model_verifier.cc
+++ b/chrome/test/live_sync/bookmark_model_verifier.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/test/live_sync/bookmark_model_verifier.h"
@@ -244,4 +244,4 @@ const BookmarkNode* BookmarkModelVerifier::SetURL(BookmarkModel* model,
return result;
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/bookmark_model_verifier.h b/chrome/test/live_sync/bookmark_model_verifier.h
index 43120af..de6d4c7 100644
--- a/chrome/test/live_sync/bookmark_model_verifier.h
+++ b/chrome/test/live_sync/bookmark_model_verifier.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_TEST_LIVE_SYNC_BOOKMARK_MODEL_VERIFIER_H_
#define CHROME_TEST_LIVE_SYNC_BOOKMARK_MODEL_VERIFIER_H_
@@ -113,4 +113,4 @@ class BookmarkModelVerifier {
#endif // CHROME_TEST_LIVE_SYNC_BOOKMARK_MODEL_VERIFIER_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.cc b/chrome/test/live_sync/live_bookmarks_sync_test.cc
index 51fc2cd..6189965 100644
--- a/chrome/test/live_sync/live_bookmarks_sync_test.cc
+++ b/chrome/test/live_sync/live_bookmarks_sync_test.cc
@@ -1,7 +1,7 @@
// Copyright (c) 2006-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.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "chrome/test/live_sync/live_bookmarks_sync_test.h"
@@ -96,4 +96,4 @@ void LiveBookmarksSyncTest::TearDownInProcessBrowserTestFixture() {
mock_host_resolver_override_.reset();
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.h b/chrome/test/live_sync/live_bookmarks_sync_test.h
index a21f8bf..f23a117 100644
--- a/chrome/test/live_sync/live_bookmarks_sync_test.h
+++ b/chrome/test/live_sync/live_bookmarks_sync_test.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_TEST_LIVE_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
#define CHROME_TEST_LIVE_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
@@ -82,4 +82,4 @@ class LiveBookmarksSyncTest : public InProcessBrowserTest {
#endif // CHROME_TEST_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/profile_sync_service_test_harness.cc b/chrome/test/live_sync/profile_sync_service_test_harness.cc
index 61c8deb..738654d 100644
--- a/chrome/test/live_sync/profile_sync_service_test_harness.cc
+++ b/chrome/test/live_sync/profile_sync_service_test_harness.cc
@@ -1,7 +1,7 @@
// Copyright (c) 2006-2008 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.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "base/message_loop.h"
#include "chrome/browser/browser.h"
@@ -250,4 +250,4 @@ bool ProfileSyncServiceTestHarness::WaitForServiceInit() {
return service_->sync_initialized();
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/profile_sync_service_test_harness.h b/chrome/test/live_sync/profile_sync_service_test_harness.h
index 48f40f1..ff51bd1 100644
--- a/chrome/test/live_sync/profile_sync_service_test_harness.h
+++ b/chrome/test/live_sync/profile_sync_service_test_harness.h
@@ -1,7 +1,7 @@
// Copyright (c) 2006-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.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#ifndef CHROME_TEST_LIVE_SYNC_PROFILE_SYNC_SERVICE_TEST_HARNESS_H_
#define CHROME_TEST_LIVE_SYNC_PROFILE_SYNC_SERVICE_TEST_HARNESS_H_
@@ -108,4 +108,4 @@ class ProfileSyncServiceTestHarness : public ProfileSyncServiceObserver {
#endif // CHROME_TEST_SYNC_PROFILE_SYNC_SERVICE_TEST_HARNESS_H_
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc b/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
index ca2263d..8e751cf 100644
--- a/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
+++ b/chrome/test/live_sync/single_client_live_bookmarks_sync_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include "base/command_line.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -153,4 +153,4 @@ IN_PROC_BROWSER_TEST_F(SingleClientLiveBookmarksSyncTest, DISABLED_GetUpdates) {
EXPECT_EQ(status.unsynced_count, 0);
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
index 368605a..49abebf 100644
--- a/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
+++ b/chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
#include <stdlib.h>
@@ -2485,4 +2485,4 @@ IN_PROC_BROWSER_TEST_F(TwoClientLiveBookmarksSyncTest,
}
-#endif // CHROME_PERSONALIZATION
+#endif // defined(BROWSER_SYNC)
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index cb380fc..460b3c5 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -202,7 +202,7 @@ void TestingProfile::BlockUntilHistoryProcessesPendingRequests() {
}
void TestingProfile::CreateProfileSyncService() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
if (!profile_sync_service_.get()) {
profile_sync_service_.reset(new ProfileSyncService(this));
profile_sync_service_->Initialize();
@@ -211,7 +211,7 @@ void TestingProfile::CreateProfileSyncService() {
}
ProfileSyncService* TestingProfile::GetProfileSyncService() {
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
return profile_sync_service_.get();
#endif
return NULL;
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index ca10ebd..54b2dfd 100644
--- a/chrome/test/testing_profile.h
+++ b/chrome/test/testing_profile.h
@@ -205,7 +205,7 @@ class TestingProfile : public Profile {
scoped_ptr<BookmarkModel> bookmark_bar_model_;
// The ProfileSyncService. Created by CreateProfileSyncService.
-#ifdef CHROME_PERSONALIZATION
+#if defined(BROWSER_SYNC)
scoped_ptr<ProfileSyncService> profile_sync_service_;
#endif