summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android_webview/browser/in_process_view_renderer.cc5
-rw-r--r--ash/accelerators/accelerator_filter_unittest.cc8
-rw-r--r--ash/display/mouse_cursor_event_filter_unittest.cc13
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc26
-rw-r--r--ash/extended_desktop_unittest.cc4
-rw-r--r--ash/shell_unittest.cc15
-rw-r--r--ash/tooltips/tooltip_controller_unittest.cc5
-rw-r--r--ash/wm/dock/docked_window_layout_manager.cc10
-rw-r--r--ash/wm/lock_state_controller_unittest.cc8
-rw-r--r--base/files/file_path_watcher_browsertest.cc57
-rw-r--r--base/process/memory_linux.cc2
-rw-r--r--base/security_unittest.cc13
-rw-r--r--cc/output/renderer_pixeltest.cc2
-rw-r--r--chrome/app/chrome_main_delegate.cc4
-rw-r--r--chrome/browser/apps/app_browsertest.cc2
-rw-r--r--chrome/browser/chrome_browser_main.cc4
-rw-r--r--chrome/browser/chrome_content_browser_client.cc2
-rw-r--r--chrome/browser/chromeos/display/display_preferences.cc4
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/event_router.cc26
-rw-r--r--chrome/browser/chromeos/login/login_display_host_impl.cc4
-rw-r--r--chrome/browser/chromeos/login/login_utils_browsertest.cc6
-rw-r--r--chrome/browser/chromeos/offline/offline_load_page.cc9
-rw-r--r--chrome/browser/chromeos/options/vpn_config_view.cc6
-rw-r--r--chrome/browser/chromeos/system/ash_system_tray_delegate.cc4
-rw-r--r--chrome/browser/download/save_package_file_picker.cc2
-rw-r--r--chrome/browser/extensions/api/dial/dial_service.cc6
-rw-r--r--chrome/browser/extensions/api/runtime/runtime_api.cc2
-rw-r--r--chrome/browser/extensions/browser_permissions_policy_delegate_unittest.cc2
-rw-r--r--chrome/browser/lifetime/application_lifetime.cc2
-rw-r--r--chrome/browser/local_discovery/privet_traffic_detector.cc6
-rw-r--r--chrome/browser/metrics/metrics_log.cc2
-rw-r--r--chrome/browser/performance_monitor/performance_monitor.cc2
-rw-r--r--chrome/browser/plugins/plugin_prefs_unittest.cc2
-rw-r--r--chrome/browser/policy/policy_browsertest.cc6
-rw-r--r--chrome/browser/process_singleton_linux_unittest.cc5
-rw-r--r--chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc2
-rw-r--r--chrome/browser/storage_monitor/storage_monitor_linux.cc17
-rw-r--r--chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc4
-rw-r--r--chrome/browser/ui/app_list/app_list_controller_browsertest.cc2
-rw-r--r--chrome/browser/ui/app_list/chrome_signin_delegate.cc2
-rw-r--r--chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc2
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc2
-rw-r--r--chrome/browser/ui/gtk/first_run_dialog.cc29
-rw-r--r--chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc7
-rw-r--r--chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc10
-rw-r--r--chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc9
-rw-r--r--chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc9
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc12
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/panels/panel_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc15
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc2
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.cc16
-rw-r--r--chrome/browser/ui/webui/instant_ui.cc2
-rw-r--r--chrome/renderer/printing/print_web_view_helper_browsertest.cc2
-rw-r--r--chrome/test/base/testing_profile.cc6
-rw-r--r--chromeos/dbus/fake_shill_service_client.cc5
-rw-r--r--chromeos/ime/ibus_daemon_controller.cc35
-rw-r--r--chromeos/network/onc/onc_validator.cc6
-rw-r--r--content/renderer/webcrypto/webcrypto_impl_unittest.cc2
-rw-r--r--content/shell/browser/shell_content_browser_client.cc4
-rw-r--r--gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc3
-rw-r--r--net/ssl/server_bound_cert_service_unittest.cc27
-rw-r--r--net/test/python_utils.cc2
-rw-r--r--net/tools/balsa/balsa_frame.cc33
-rw-r--r--net/tools/quic/quic_time_wait_list_manager_test.cc17
-rw-r--r--sandbox/linux/seccomp-bpf/sandbox_bpf.cc15
-rw-r--r--ui/aura/root_window_host_x11.cc40
-rw-r--r--ui/gfx/interpolated_transform_unittest.cc10
-rw-r--r--ui/snapshot/test/run_all_unittests.cc3
-rw-r--r--ui/views/controls/menu/menu_image_util.cc5
-rw-r--r--ui/views/widget/native_widget_aura.cc3
72 files changed, 94 insertions, 546 deletions
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc
index 88415f7..4496f2b 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -107,11 +107,6 @@ bool RasterizeIntoBitmap(JNIEnv* env,
return succeeded;
}
-bool RenderPictureToCanvas(SkPicture* picture, SkCanvas* canvas) {
- canvas->drawPicture(*picture);
- return true;
-}
-
class ScopedPixelAccess {
public:
ScopedPixelAccess(JNIEnv* env, jobject java_canvas) {
diff --git a/ash/accelerators/accelerator_filter_unittest.cc b/ash/accelerators/accelerator_filter_unittest.cc
index 4dff94b..c1a7054 100644
--- a/ash/accelerators/accelerator_filter_unittest.cc
+++ b/ash/accelerators/accelerator_filter_unittest.cc
@@ -23,14 +23,6 @@
namespace ash {
namespace test {
-namespace {
-
-AcceleratorController* GetController() {
- return Shell::GetInstance()->accelerator_controller();
-}
-
-} // namespace
-
typedef AshTestBase AcceleratorFilterTest;
// Tests if AcceleratorFilter works without a focused window.
diff --git a/ash/display/mouse_cursor_event_filter_unittest.cc b/ash/display/mouse_cursor_event_filter_unittest.cc
index 294cbf1..7fa79fd 100644
--- a/ash/display/mouse_cursor_event_filter_unittest.cc
+++ b/ash/display/mouse_cursor_event_filter_unittest.cc
@@ -16,19 +16,6 @@
namespace ash {
namespace internal {
-namespace {
-
-gfx::Display GetPrimaryDisplay() {
- return Shell::GetScreen()->GetDisplayNearestWindow(
- Shell::GetAllRootWindows()[0]);
-}
-
-gfx::Display GetSecondaryDisplay() {
- return Shell::GetScreen()->GetDisplayNearestWindow(
- Shell::GetAllRootWindows()[1]);
-}
-
-} // namespace
class MouseCursorEventFilterTest : public test::AshTestBase {
public:
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 6e13a44..baf5acb 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -287,32 +287,6 @@ void DispatchGesture(ui::EventType gesture_type, gfx::Point location) {
&gesture_event);
}
-bool IsGestureEventType(ui::EventType type) {
- switch (type) {
- case ui::ET_GESTURE_SCROLL_BEGIN:
- case ui::ET_GESTURE_SCROLL_END:
- case ui::ET_GESTURE_SCROLL_UPDATE:
- case ui::ET_GESTURE_TAP:
- case ui::ET_GESTURE_TAP_CANCEL:
- case ui::ET_GESTURE_TAP_DOWN:
- case ui::ET_GESTURE_BEGIN:
- case ui::ET_GESTURE_END:
- case ui::ET_GESTURE_TWO_FINGER_TAP:
- case ui::ET_GESTURE_PINCH_BEGIN:
- case ui::ET_GESTURE_PINCH_END:
- case ui::ET_GESTURE_PINCH_UPDATE:
- case ui::ET_GESTURE_LONG_PRESS:
- case ui::ET_GESTURE_LONG_TAP:
- case ui::ET_GESTURE_MULTIFINGER_SWIPE:
- case ui::ET_SCROLL_FLING_CANCEL:
- case ui::ET_SCROLL_FLING_START:
- return true;
- default:
- break;
- }
- return false;
-}
-
} // namespace
class DragDropControllerTest : public AshTestBase {
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index d6b5db2..8fed2ba 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -42,10 +42,6 @@ void SetSecondaryDisplayLayout(DisplayLayout::Position position) {
SetLayoutForCurrentDisplays(layout);
}
-internal::DisplayManager* GetDisplayManager() {
- return Shell::GetInstance()->display_manager();
-}
-
class ModalWidgetDelegate : public views::WidgetDelegateView {
public:
ModalWidgetDelegate() {}
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 4004c20..7bd36af 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -459,21 +459,6 @@ TEST_F(ShellTest, FullscreenWindowHidesShelf) {
widget->Close();
}
-namespace {
-
-// Builds the list of parents from |window| to the root. The returned vector is
-// in reverse order (|window| is first).
-std::vector<aura::Window*> BuildPathToRoot(aura::Window* window) {
- std::vector<aura::Window*> results;
- while (window) {
- results.push_back(window);
- window = window->parent();
- }
- return results;
-}
-
-} // namespace
-
// Various assertions around SetShelfAutoHideBehavior() and
// GetShelfAutoHideBehavior().
TEST_F(ShellTest, ToggleAutoHide) {
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index 25b2f01..0b02047 100644
--- a/ash/tooltips/tooltip_controller_unittest.cc
+++ b/ash/tooltips/tooltip_controller_unittest.cc
@@ -71,11 +71,6 @@ TooltipController* GetController() {
aura::client::GetTooltipClient(Shell::GetPrimaryRootWindow()));
}
-gfx::Font GetDefaultFont() {
- return ui::ResourceBundle::GetSharedInstance().GetFont(
- ui::ResourceBundle::BaseFont);
-}
-
} // namespace
class TooltipControllerTest : public AshTestBase {
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index f244f1c..d1f0b1d 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -82,16 +82,6 @@ class DockedBackgroundWidget : public views::Widget {
DISALLOW_COPY_AND_ASSIGN(DockedBackgroundWidget);
};
-DockedWindowLayoutManager* GetDockLayoutManager(aura::Window* window,
- const gfx::Point& location) {
- gfx::Rect near_location(location, gfx::Size());
- aura::Window* dock = Shell::GetContainer(
- wm::GetRootWindowMatching(near_location),
- kShellWindowId_DockedContainer);
- return static_cast<internal::DockedWindowLayoutManager*>(
- dock->layout_manager());
-}
-
// Returns true if a window is a popup or a transient child.
bool IsPopupOrTransient(const aura::Window* window) {
return (window->type() == aura::client::WINDOW_TYPE_POPUP ||
diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc
index 425f439..5290457d 100644
--- a/ash/wm/lock_state_controller_unittest.cc
+++ b/ash/wm/lock_state_controller_unittest.cc
@@ -55,14 +55,6 @@ bool IsBackgroundHidden() {
IsVisible();
}
-void ShowBackground() {
- ui::ScopedLayerAnimationSettings settings(
- GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->
- layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta());
- GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->Show();
-}
-
void HideBackground() {
ui::ScopedLayerAnimationSettings settings(
GetContainer(internal::kShellWindowId_DesktopBackgroundContainer)->
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index 5ded1e8..14a25a1 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -768,8 +768,8 @@ enum Permission {
Execute
};
+#if defined(OS_MACOSX)
bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
-#if defined(OS_POSIX)
struct stat stat_buf;
if (stat(path.value().c_str(), &stat_buf) != 0)
@@ -796,61 +796,8 @@ bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
stat_buf.st_mode &= ~mode;
}
return chmod(path.value().c_str(), stat_buf.st_mode) == 0;
-
-#elif defined(OS_WIN)
- PACL old_dacl;
- PSECURITY_DESCRIPTOR security_descriptor;
- if (GetNamedSecurityInfo(const_cast<wchar_t*>(path.value().c_str()),
- SE_FILE_OBJECT,
- DACL_SECURITY_INFORMATION, NULL, NULL, &old_dacl,
- NULL, &security_descriptor) != ERROR_SUCCESS)
- return false;
-
- DWORD mode = 0;
- switch (perm) {
- case Read:
- mode = GENERIC_READ;
- break;
- case Write:
- mode = GENERIC_WRITE;
- break;
- case Execute:
- mode = GENERIC_EXECUTE;
- break;
- default:
- ADD_FAILURE() << "unknown perm " << perm;
- return false;
- }
-
- // Deny Read access for the current user.
- EXPLICIT_ACCESS change;
- change.grfAccessPermissions = mode;
- change.grfAccessMode = allow ? GRANT_ACCESS : DENY_ACCESS;
- change.grfInheritance = 0;
- change.Trustee.pMultipleTrustee = NULL;
- change.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
- change.Trustee.TrusteeForm = TRUSTEE_IS_NAME;
- change.Trustee.TrusteeType = TRUSTEE_IS_USER;
- change.Trustee.ptstrName = L"CURRENT_USER";
-
- PACL new_dacl;
- if (SetEntriesInAcl(1, &change, old_dacl, &new_dacl) != ERROR_SUCCESS) {
- LocalFree(security_descriptor);
- return false;
- }
-
- DWORD rc = SetNamedSecurityInfo(const_cast<wchar_t*>(path.value().c_str()),
- SE_FILE_OBJECT, DACL_SECURITY_INFORMATION,
- NULL, NULL, new_dacl, NULL);
- LocalFree(security_descriptor);
- LocalFree(new_dacl);
-
- return rc == ERROR_SUCCESS;
-#else
- NOTIMPLEMENTED();
- return false;
-#endif
}
+#endif // defined(OS_MACOSX)
#if defined(OS_MACOSX)
// Linux implementation of FilePathWatcher doesn't catch attribute changes.
diff --git a/base/process/memory_linux.cc b/base/process/memory_linux.cc
index f81429b..6bed68b 100644
--- a/base/process/memory_linux.cc
+++ b/base/process/memory_linux.cc
@@ -18,6 +18,7 @@ size_t g_oom_size = 0U;
namespace {
+#if !defined(OS_ANDROID)
void OnNoMemorySize(size_t size) {
g_oom_size = size;
@@ -29,6 +30,7 @@ void OnNoMemorySize(size_t size) {
void OnNoMemory() {
OnNoMemorySize(0);
}
+#endif // !defined(OS_ANDROID)
} // namespace
diff --git a/base/security_unittest.cc b/base/security_unittest.cc
index 1c24fad..cf3b129 100644
--- a/base/security_unittest.cc
+++ b/base/security_unittest.cc
@@ -230,19 +230,6 @@ TEST(SecurityTest, CallocOverflow) {
}
#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(__x86_64__)
-// Useful for debugging.
-void PrintProcSelfMaps() {
- int fd = open("/proc/self/maps", O_RDONLY);
- file_util::ScopedFD fd_closer(&fd);
- ASSERT_GE(fd, 0);
- char buffer[1<<13];
- int ret;
- ret = read(fd, buffer, sizeof(buffer) - 1);
- ASSERT_GT(ret, 0);
- buffer[ret - 1] = 0;
- fprintf(stdout, "%s\n", buffer);
-}
-
// Check if ptr1 and ptr2 are separated by less than size chars.
bool ArePointersToSameArea(void* ptr1, void* ptr2, size_t size) {
ptrdiff_t ptr_diff = reinterpret_cast<char*>(std::max(ptr1, ptr2)) -
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index 6123d31..534db8e 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.cc
@@ -21,6 +21,7 @@
namespace cc {
namespace {
+#if !defined(OS_ANDROID)
scoped_ptr<RenderPass> CreateTestRootRenderPass(RenderPass::Id id,
gfx::Rect rect) {
scoped_ptr<RenderPass> pass = RenderPass::Create();
@@ -195,7 +196,6 @@ bool FuzzyForSoftwareOnlyPixelComparator<RendererType>::Compare(
return exact_.Compare(actual_bmp, expected_bmp);
}
-#if !defined(OS_ANDROID)
TYPED_TEST(RendererPixelTest, SimpleGreenRect) {
gfx::Rect rect(this->device_viewport_size_);
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 80bde7e..8fe2912 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -288,7 +288,7 @@ void HandleHelpSwitches(const CommandLine& command_line) {
}
#endif
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
void SIGTERMProfilingShutdown(int signal) {
Profiling::Stop();
struct sigaction sigact;
@@ -814,14 +814,12 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
breakpad::InitCrashReporter();
// Reset the command line for the newly spawned process.
crash_keys::SetSwitchesFromCommandLine(CommandLine::ForCurrentProcess());
-#endif
}
#endif // OS_MACOSX
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index 76f8c6d..4276ae8 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -173,6 +173,7 @@ class ScopedPreviewTestingDelegate : PrintPreviewUI::TestingDelegate {
gfx::Size dialog_size_;
};
+#if !defined(OS_WIN)
bool CopyTestDataAndSetCommandLineArg(
const base::FilePath& test_data_file,
const base::FilePath& temp_dir,
@@ -186,6 +187,7 @@ bool CopyTestDataAndSetCommandLineArg(
command_line->AppendArgPath(path);
return true;
}
+#endif
#if !defined(OS_CHROMEOS)
const char kTestFilePath[] = "platform_apps/launch_files/test.txt";
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 2677ab8..2764b24 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -216,6 +216,7 @@ void HandleTestParameters(const CommandLine& command_line) {
}
}
+#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
void AddFirstRunNewTabs(StartupBrowserCreator* browser_creator,
const std::vector<GURL>& new_tabs) {
for (std::vector<GURL>::const_iterator it = new_tabs.begin();
@@ -224,6 +225,7 @@ void AddFirstRunNewTabs(StartupBrowserCreator* browser_creator,
browser_creator->AddFirstRunTab(*it);
}
}
+#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
// Returns the new local state object, guaranteed non-NULL.
// |local_state_task_runner| must be a shutdown-blocking task runner.
@@ -389,6 +391,7 @@ OSStatus KeychainCallback(SecKeychainEvent keychain_event,
}
#endif
+#if !defined(OS_ANDROID)
void RegisterComponentsForUpdate(const CommandLine& command_line) {
ComponentUpdateService* cus = g_browser_process->component_updater();
@@ -473,6 +476,7 @@ bool ProcessSingletonNotificationCallback(
command_line, current_directory, startup_profile_dir);
return true;
}
+#endif // !defined(OS_ANDROID)
void LaunchDevToolsHandlerIfNeeded(const CommandLine& command_line) {
if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index ffa0b9e..620ac98 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -476,6 +476,7 @@ bool CertMatchesFilter(const net::X509Certificate& cert,
return false;
}
+#if !defined(OS_ANDROID)
// Fills |map| with the per-script font prefs under path |map_name|.
void FillFontFamilyMap(const PrefService* prefs,
const char* map_name,
@@ -548,6 +549,7 @@ int GetCrashSignalFD(const CommandLine& command_line) {
return -1;
}
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
+#endif // !defined(OS_ANDROID)
#if !defined(OS_CHROMEOS)
GURL GetEffectiveURLForSignin(const GURL& url) {
diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
index d455b37..96f8cdf 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -77,10 +77,6 @@ bool UserCanSaveDisplayPreference() {
user_manager->IsLoggedInAsKioskApp());
}
-ash::DisplayController* GetDisplayController() {
- return ash::Shell::GetInstance()->display_controller();
-}
-
void LoadDisplayLayouts() {
PrefService* local_state = g_browser_process->local_state();
ash::internal::DisplayLayoutStore* layout_store =
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index 39714ef..675e444 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -54,10 +54,6 @@ namespace {
const char kPathChanged[] = "changed";
const char kPathWatchError[] = "error";
-// Used as a callback for FileSystem::MarkCacheFileAsUnmounted().
-void OnMarkAsUnmounted(drive::FileError error) {
- // Do nothing.
-}
void DirectoryExistsOnBlockingPool(const base::FilePath& directory_path,
const base::Closure& success_callback,
const base::Closure& failure_callback) {
@@ -82,23 +78,6 @@ void DirectoryExistsOnUIThread(const base::FilePath& directory_path,
failure_callback));
};
-// Creates a base::FilePathWatcher and starts watching at |watch_path| with
-// |callback|. Returns NULL on failure.
-base::FilePathWatcher* CreateAndStartFilePathWatcher(
- const base::FilePath& watch_path,
- const base::FilePathWatcher::Callback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- DCHECK(!callback.is_null());
-
- base::FilePathWatcher* watcher(new base::FilePathWatcher);
- if (!watcher->Watch(watch_path, false /* recursive */, callback)) {
- delete watcher;
- return NULL;
- }
-
- return watcher;
-}
-
// Constants for the "transferState" field of onFileTransferUpdated event.
const char kFileTransferStateStarted[] = "started";
const char kFileTransferStateInProgress[] = "in_progress";
@@ -114,11 +93,6 @@ bool IsUploadJob(drive::JobType type) {
type == drive::TYPE_UPLOAD_EXISTING_FILE);
}
-// Utility function to check if |job_info| is a file downloading job.
-bool IsDownloadJob(drive::JobType type) {
- return type == drive::TYPE_DOWNLOAD_FILE;
-}
-
// Converts the job info to its JSON (Value) form.
scoped_ptr<base::DictionaryValue> JobInfoToDictionaryValue(
const std::string& extension_id,
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index 61965c4..ac337c7 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -150,10 +150,6 @@ void DetermineAndSaveHardwareKeyboard(const std::string& locale,
}
}
-ui::Layer* GetLayer(views::Widget* widget) {
- return widget->GetNativeView()->layer();
-}
-
// A class to observe an implicit animation and invokes the callback after the
// animation is completed.
class AnimationObserver : public ui::ImplicitAnimationObserver {
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc
index 4abf5b8..ba0651d 100644
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc
@@ -114,12 +114,6 @@ const char kDMPolicyRequest[] =
const char kDMToken[] = "1234";
-// Used to mark |flag|, indicating that RefreshPolicies() has executed its
-// callback.
-void SetFlag(bool* flag) {
- *flag = true;
-}
-
// Single task of the fake IO loop used in the test, that just waits until
// it is signaled to quit or perform some work.
// |completion| is the event to wait for, and |work| is the task to invoke
diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc
index 0219847..1b43382 100644
--- a/chrome/browser/chromeos/offline/offline_load_page.cc
+++ b/chrome/browser/chromeos/offline/offline_load_page.cc
@@ -48,15 +48,6 @@ using content::BrowserThread;
using content::InterstitialPage;
using content::WebContents;
-namespace {
-
-// A utility function to set the dictionary's value given by |resource_id|.
-void SetString(DictionaryValue* strings, const char* name, int resource_id) {
- strings->SetString(name, l10n_util::GetStringUTF16(resource_id));
-}
-
-} // namespace
-
namespace chromeos {
OfflineLoadPage::OfflineLoadPage(WebContents* web_contents,
diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
index ddb6c2d..35f29d7 100644
--- a/chrome/browser/chromeos/options/vpn_config_view.cc
+++ b/chrome/browser/chromeos/options/vpn_config_view.cc
@@ -100,12 +100,6 @@ std::string GetPemFromDictionary(
return pem;
}
-void ShillError(const std::string& function,
- const std::string& error_name,
- scoped_ptr<base::DictionaryValue> error_data) {
- NET_LOG_ERROR("Shill Error from VpnConfigView: " + error_name, function);
-}
-
} // namespace
namespace chromeos {
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 33338fcc..fa5b655 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -203,10 +203,6 @@ void BluetoothPowerFailure() {
// TODO(sad): Show an error bubble?
}
-void BluetoothDiscoveryFailure() {
- // TODO(sad): Show an error bubble?
-}
-
void BluetoothSetDiscoveringError() {
LOG(ERROR) << "BluetoothSetDiscovering failed.";
}
diff --git a/chrome/browser/download/save_package_file_picker.cc b/chrome/browser/download/save_package_file_picker.cc
index 484e254..d279978 100644
--- a/chrome/browser/download/save_package_file_picker.cc
+++ b/chrome/browser/download/save_package_file_picker.cc
@@ -41,6 +41,7 @@ namespace {
// exists only for testing.
bool g_should_prompt_for_filename = true;
+#if !defined(OS_CHROMEOS)
// Used for mapping between SavePageType constants and the indexes above.
const SavePageType kIndexToSaveType[] = {
content::SAVE_PAGE_TYPE_UNKNOWN,
@@ -56,6 +57,7 @@ int SavePackageTypeToIndex(SavePageType type) {
NOTREACHED();
return -1;
}
+#endif
// Indexes used for specifying which element in the extensions dropdown
// the user chooses when picking a save type.
diff --git a/chrome/browser/extensions/api/dial/dial_service.cc b/chrome/browser/extensions/api/dial/dial_service.cc
index 2caf51c..23f6ab4 100644
--- a/chrome/browser/extensions/api/dial/dial_service.cc
+++ b/chrome/browser/extensions/api/dial/dial_service.cc
@@ -105,6 +105,7 @@ std::string BuildRequest() {
return request;
}
+#if !defined(OS_CHROMEOS)
void GetNetworkListOnFileThread(
const scoped_refptr<base::MessageLoopProxy>& loop,
const base::Callback<void(const NetworkInterfaceList& networks)>& cb) {
@@ -116,7 +117,8 @@ void GetNetworkListOnFileThread(
loop->PostTask(FROM_HERE, base::Bind(cb, list));
}
-#if defined(OS_CHROMEOS)
+#else
+
IPAddressNumber GetBestBindAddressByType(
const chromeos::NetworkTypePattern& type) {
const chromeos::NetworkState* state = chromeos::NetworkHandler::Get()
@@ -147,7 +149,7 @@ IPAddressNumber GetBestBindAddressChromeOS() {
}
return bind_ip_address;
}
-#endif
+#endif // !defined(OS_CHROMEOS)
} // namespace
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index 91df37e..e105c83 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -121,12 +121,14 @@ void SetUninstallUrl(ExtensionPrefs* prefs,
new base::StringValue(url_string));
}
+#if defined(ENABLE_EXTENSIONS)
std::string GetUninstallUrl(ExtensionPrefs* prefs,
const std::string& extension_id) {
std::string url_string;
prefs->ReadPrefAsString(extension_id, kUninstallUrl, &url_string);
return url_string;
}
+#endif // defined(ENABLE_EXTENSIONS)
} // namespace
diff --git a/chrome/browser/extensions/browser_permissions_policy_delegate_unittest.cc b/chrome/browser/extensions/browser_permissions_policy_delegate_unittest.cc
index 7599b7f..6174b6e 100644
--- a/chrome/browser/extensions/browser_permissions_policy_delegate_unittest.cc
+++ b/chrome/browser/extensions/browser_permissions_policy_delegate_unittest.cc
@@ -37,6 +37,7 @@ class BrowserPermissionsPolicyDelegateTest : public testing::Test {
TestingProfile* profile_;
};
+#if !defined(OS_CHROMEOS)
scoped_refptr<const Extension> CreateTestExtension(const std::string& id) {
return ExtensionBuilder()
.SetManifest(DictionaryBuilder()
@@ -47,6 +48,7 @@ scoped_refptr<const Extension> CreateTestExtension(const std::string& id) {
.SetID(id)
.Build();
}
+#endif
} // namespace
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index aad24b1..711a075 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -51,6 +51,7 @@
namespace chrome {
namespace {
+#if !defined(OS_ANDROID)
// Returns true if all browsers can be closed without user interaction.
// This currently checks if there is pending download, or if it needs to
// handle unload handler.
@@ -71,6 +72,7 @@ bool AreAllBrowsersCloseable() {
}
return true;
}
+#endif // !defined(OS_ANDROID)
int g_keep_alive_count = 0;
diff --git a/chrome/browser/local_discovery/privet_traffic_detector.cc b/chrome/browser/local_discovery/privet_traffic_detector.cc
index c262698..e95c74f 100644
--- a/chrome/browser/local_discovery/privet_traffic_detector.cc
+++ b/chrome/browser/local_discovery/privet_traffic_detector.cc
@@ -44,12 +44,6 @@ void GetNetworkListOnFileThread(
base::Bind(callback, ip4_networks));
}
-bool IsIpPrefixEqual(const net::IPAddressNumber& ip1,
- const net::IPAddressNumber& ip2) {
- return !ip1.empty() && ip1.size() == ip2.size() &&
- std::equal(ip1.begin(), ip1.end() - 1, ip2.begin());
-}
-
} // namespace
namespace local_discovery {
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index 0d4adee..6e4b695 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -203,6 +203,7 @@ ProfilerEventProto::TrackedObject::ProcessType AsProtobufProcessType(
}
}
+#if defined(ENABLE_PLUGINS)
// Returns the plugin preferences corresponding for this user, if available.
// If multiple user profiles are loaded, returns the preferences corresponding
// to an arbitrary one of the profiles.
@@ -232,6 +233,7 @@ void SetPluginInfo(const content::WebPluginInfo& plugin_info,
if (plugin_prefs)
plugin->set_is_disabled(!plugin_prefs->IsPluginEnabled(plugin_info));
}
+#endif // defined(ENABLE_PLUGINS)
void WriteFieldTrials(const std::vector<ActiveGroupId>& field_trial_ids,
SystemProfileProto* system_profile) {
diff --git a/chrome/browser/performance_monitor/performance_monitor.cc b/chrome/browser/performance_monitor/performance_monitor.cc
index c539d09..358b78f 100644
--- a/chrome/browser/performance_monitor/performance_monitor.cc
+++ b/chrome/browser/performance_monitor/performance_monitor.cc
@@ -51,10 +51,12 @@ namespace performance_monitor {
namespace {
+#if !defined(OS_ANDROID)
std::string TimeToString(base::Time time) {
int64 time_int64 = time.ToInternalValue();
return base::Int64ToString(time_int64);
}
+#endif
bool StringToTime(std::string time, base::Time* output) {
int64 time_int64 = 0;
diff --git a/chrome/browser/plugins/plugin_prefs_unittest.cc b/chrome/browser/plugins/plugin_prefs_unittest.cc
index 397eef5..73302bd 100644
--- a/chrome/browser/plugins/plugin_prefs_unittest.cc
+++ b/chrome/browser/plugins/plugin_prefs_unittest.cc
@@ -31,6 +31,7 @@ void CanEnablePluginCallback(const base::Closure& quit_closure,
quit_closure.Run();
}
+#if !(defined(OS_LINUX) && defined(USE_AURA))
base::FilePath GetComponentUpdatedPepperFlashPath(
const base::FilePath::StringType& version) {
base::FilePath path;
@@ -46,6 +47,7 @@ base::FilePath GetBundledPepperFlashPath() {
EXPECT_TRUE(PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &path));
return path;
}
+#endif // !(defined(OS_LINUX) && defined(USE_AURA))
void GotPlugins(const base::Closure& quit_closure,
const std::vector<content::WebPluginInfo>& plugins) {
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 89088f1a..7f94473e 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -303,6 +303,7 @@ void CheckURLIsBlocked(Browser* browser, const char* spec) {
EXPECT_TRUE(result);
}
+#if !defined(OS_CHROMEOS)
// Downloads a file named |file| and expects it to be saved to |dir|, which
// must be empty.
void DownloadAndVerifyFile(
@@ -327,7 +328,8 @@ void DownloadAndVerifyFile(
EXPECT_EQ(base::FilePath(), enumerator.Next());
}
-#if defined(OS_CHROMEOS)
+#else
+
int CountScreenshots() {
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext());
@@ -342,6 +344,7 @@ int CountScreenshots() {
#endif
// Checks if WebGL is enabled in the given WebContents.
+#if defined(OS_MACOSX)
bool IsWebGLEnabled(content::WebContents* contents) {
bool result = false;
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
@@ -352,6 +355,7 @@ bool IsWebGLEnabled(content::WebContents* contents) {
&result));
return result;
}
+#endif // defined(OS_MACOSX)
bool IsJavascriptEnabled(content::WebContents* contents) {
scoped_ptr<base::Value> value = content::ExecuteScriptAndGetValue(
diff --git a/chrome/browser/process_singleton_linux_unittest.cc b/chrome/browser/process_singleton_linux_unittest.cc
index df20e0e..689a2df 100644
--- a/chrome/browser/process_singleton_linux_unittest.cc
+++ b/chrome/browser/process_singleton_linux_unittest.cc
@@ -31,11 +31,6 @@ using content::BrowserThread;
namespace {
-bool NotificationCallback(const CommandLine& command_line,
- const base::FilePath& current_directory) {
- return true;
-}
-
class ProcessSingletonLinuxTest : public testing::Test {
public:
// A ProcessSingleton exposing some protected methods for testing.
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index a69d0427..989e73b 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -106,6 +106,7 @@ void NotifyDownloadInitiatedOnUI(int render_process_id, int render_view_id) {
content::NotificationService::NoDetails());
}
+#if !defined(OS_ANDROID)
// Goes through the extension's file browser handlers and checks if there is one
// that can handle the |mime_type|.
// |extension| must not be NULL.
@@ -149,6 +150,7 @@ void SendExecuteMimeTypeHandlerEvent(scoped_ptr<content::StreamHandle> stream,
streams_private->ExecuteMimeTypeHandler(
extension_id, web_contents, stream.Pass(), expected_content_size);
}
+#endif // !defined(OS_ANDROID)
enum PrerenderSchemeCancelReason {
PRERENDER_SCHEME_CANCEL_REASON_EXTERNAL_PROTOCOL,
diff --git a/chrome/browser/storage_monitor/storage_monitor_linux.cc b/chrome/browser/storage_monitor/storage_monitor_linux.cc
index 340e479..8717f17 100644
--- a/chrome/browser/storage_monitor/storage_monitor_linux.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_linux.cc
@@ -111,23 +111,6 @@ uint64 GetDeviceStorageSize(const base::FilePath& device_path,
total_size_in_bytes * 512 : 0;
}
-// Constructs the device name from the device properties. If the device details
-// are unavailable, returns an empty string.
-void GetDeviceName(struct udev_device* device,
- string16* out_volume_label,
- string16* out_vendor_name,
- string16* out_model_name) {
- std::string device_label = GetUdevDevicePropertyValue(device, kLabel);
- std::string vendor_name = GetUdevDevicePropertyValue(device, kVendor);
- std::string model_name = GetUdevDevicePropertyValue(device, kModel);
- if (out_volume_label)
- *out_volume_label = UTF8ToUTF16(device_label);
- if (out_vendor_name)
- *out_vendor_name = UTF8ToUTF16(vendor_name);
- if (out_model_name)
- *out_model_name = UTF8ToUTF16(model_name);
-}
-
// Gets the device information using udev library.
scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
const base::FilePath& mount_point) {
diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
index 289f983..54e0c26 100644
--- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc
@@ -88,6 +88,7 @@ void DidProcessRemoteChange(SyncStatusCode* status_out,
*url_out = url;
}
+#if !defined(OS_ANDROID)
void DidGetRemoteVersions(
SyncStatusCode* status_out,
std::vector<RemoteFileSyncService::Version>* versions_out,
@@ -105,6 +106,7 @@ void DidDownloadRemoteVersion(
*status_out = status;
*downloaded_out = downloaded.Pass();
}
+#endif // !defined(OS_ANDROID)
void ExpectEqStatus(bool* done,
SyncStatusCode expected,
@@ -144,6 +146,7 @@ GURL ExtensionNameToGURL(const std::string& extension_name) {
ExtensionNameToId(extension_name));
}
+#if !defined(OS_ANDROID)
ACTION(InvokeCompletionCallback) {
base::MessageLoopProxy::current()->PostTask(FROM_HERE, arg2);
}
@@ -179,6 +182,7 @@ ACTION(InvokeDidApplyRemoteChange) {
base::MessageLoopProxy::current()->PostTask(
FROM_HERE, base::Bind(arg3, SYNC_STATUS_OK));
}
+#endif // !defined(OS_ANDROID)
} // namespace
diff --git a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
index 9206803..d7c1060 100644
--- a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
@@ -65,6 +65,7 @@ class AppListControllerBrowserTest : public InProcessBrowserTest {
DISALLOW_COPY_AND_ASSIGN(AppListControllerBrowserTest);
};
+#if !defined(OS_LINUX)
AppListService* GetAppListService() {
// TODO(tapted): Consider testing ash explicitly on the win-ash trybot.
return AppListService::Get(chrome::GetActiveDesktop());
@@ -72,7 +73,6 @@ AppListService* GetAppListService() {
// Test the CreateNewWindow function of the controller delegate.
// TODO(mgiuca): Enable on Linux when supported.
-#if !defined(OS_LINUX)
IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) {
const chrome::HostDesktopType desktop = chrome::GetActiveDesktop();
AppListService* service = GetAppListService();
diff --git a/chrome/browser/ui/app_list/chrome_signin_delegate.cc b/chrome/browser/ui/app_list/chrome_signin_delegate.cc
index 8faf3fa..696dc78 100644
--- a/chrome/browser/ui/app_list/chrome_signin_delegate.cc
+++ b/chrome/browser/ui/app_list/chrome_signin_delegate.cc
@@ -22,9 +22,11 @@
namespace {
+#if !defined(OS_CHROMEOS)
SigninManagerBase* GetSigninManager(Profile* profile) {
return SigninManagerFactory::GetForProfile(profile);
}
+#endif // !defined(OS_CHROMEOS)
} // namespace
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index b8b7d2f..a3e7646 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -28,6 +28,7 @@
namespace {
+#if !defined(OS_CHROMEOS) && defined(USE_ASH)
// Returns the desktop this process was initially launched in.
chrome::HostDesktopType GetInitialDesktop() {
#if defined(OS_WIN) && defined(USE_ASH)
@@ -39,6 +40,7 @@ chrome::HostDesktopType GetInitialDesktop() {
#endif
return chrome::HOST_DESKTOP_TYPE_NATIVE;
}
+#endif // !defined(OS_CHROMEOS) && defined(USE_ASH)
} // namespace
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 70311db..30f1ed8 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -29,6 +29,7 @@ using content::WebContents;
namespace {
+#if !defined(OS_ANDROID)
bool FetchUsernameThroughSigninManager(Profile* profile, std::string* output) {
// In an incognito window these services are not available.
SigninManagerBase* signin_manager =
@@ -46,6 +47,7 @@ bool FetchUsernameThroughSigninManager(Profile* profile, std::string* output) {
*output = signin_manager->GetAuthenticatedUsername();
return true;
}
+#endif // !defined(OS_ANDROID)
} // namespace
diff --git a/chrome/browser/ui/gtk/first_run_dialog.cc b/chrome/browser/ui/gtk/first_run_dialog.cc
index 8480f31..25505b5 100644
--- a/chrome/browser/ui/gtk/first_run_dialog.cc
+++ b/chrome/browser/ui/gtk/first_run_dialog.cc
@@ -34,35 +34,6 @@
#include "chrome/browser/browser_process.h"
#endif
-namespace {
-
-// Set the (x, y) coordinates of the welcome message (which floats on top of
-// the omnibox image at the top of the first run dialog).
-void SetWelcomePosition(GtkFloatingContainer* container,
- GtkAllocation* allocation,
- GtkWidget* label) {
- GValue value = { 0, };
- g_value_init(&value, G_TYPE_INT);
-
- GtkRequisition req;
- gtk_widget_size_request(label, &req);
-
- int x = base::i18n::IsRTL() ?
- allocation->width - req.width - ui::kContentAreaSpacing :
- ui::kContentAreaSpacing;
- g_value_set_int(&value, x);
- gtk_container_child_set_property(GTK_CONTAINER(container),
- label, "x", &value);
-
- int y = allocation->height / 2 - req.height / 2;
- g_value_set_int(&value, y);
- gtk_container_child_set_property(GTK_CONTAINER(container),
- label, "y", &value);
- g_value_unset(&value);
-}
-
-} // namespace
-
namespace first_run {
bool ShowFirstRunDialog(Profile* profile) {
diff --git a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
index a4b8da6..1162d216 100644
--- a/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
+++ b/chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.cc
@@ -39,13 +39,6 @@ void SumChildrenWidthRequisition(GtkWidget* child, gpointer userdata) {
}
}
-void ShowInvisibleChildren(GtkWidget* child, gpointer userdata) {
- if (!gtk_widget_get_visible(child)) {
- gtk_widget_show(child);
- ++(*reinterpret_cast<int*>(userdata));
- }
-}
-
void ChildSizeAllocate(GtkWidget* child, gpointer userdata) {
if (!gtk_widget_get_visible(child))
return;
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
index 84a7872..1f47f31 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc
@@ -68,16 +68,6 @@ size_t GetUTF8Offset(const string16& text, size_t text_offset) {
return UTF16ToUTF8(text.substr(0, text_offset)).size();
}
-// A helper method for determining a valid drag operation given the allowed
-// operation. We prefer copy over link.
-int CopyOrLinkDragOperation(int drag_operation) {
- if (drag_operation & ui::DragDropTypes::DRAG_COPY)
- return ui::DragDropTypes::DRAG_COPY;
- if (drag_operation & ui::DragDropTypes::DRAG_LINK)
- return ui::DragDropTypes::DRAG_LINK;
- return ui::DragDropTypes::DRAG_NONE;
-}
-
// Stores GTK+-specific state so it can be restored after switching tabs.
struct ViewState {
explicit ViewState(const OmniboxViewGtk::CharRange& selection_range)
diff --git a/chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc b/chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc
index 5c026fc..3cbcbc2 100644
--- a/chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc
@@ -35,15 +35,6 @@
using views::FocusManager;
-namespace {
-
-// Returns the bounds of |view| in widget coordinates.
-gfx::Rect GetRectInWidget(views::View* view) {
- return view->ConvertRectToWidget(view->GetLocalBounds());
-}
-
-}
-
typedef InProcessBrowserTest BrowserViewTest;
// Active window and focus testing is not reliable on Windows crbug.com/79493
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc
index 68ea422..78705ca 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_browsertest.cc
@@ -12,15 +12,6 @@
#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
-namespace {
-
-// Returns the bounds of |view| in widget coordinates.
-gfx::Rect GetRectInWidget(views::View* view) {
- return view->ConvertRectToWidget(view->GetLocalBounds());
-}
-
-} // namespace
-
// TODO(jamescook): If immersive mode becomes popular on CrOS, consider porting
// it to other Aura platforms (win_aura, linux_aura). http://crbug.com/163931
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 7f59ea3..53a3285 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -76,18 +76,6 @@ const int kIconMinimumSize = 16;
// the top of the screen so the tabs appear flush against the screen edge.
const int kTabstripTopShadowThickness = 3;
-// Converts |bounds| from |src|'s coordinate system to |dst|, and checks if
-// |pt| is contained within.
-bool ConvertedContainsCheck(gfx::Rect bounds, const views::View* src,
- const views::View* dst, const gfx::Point& pt) {
- DCHECK(src);
- DCHECK(dst);
- gfx::Point origin(bounds.origin());
- views::View::ConvertPointToTarget(src, dst, &origin);
- bounds.set_origin(origin);
- return bounds.Contains(pt);
-}
-
} // namespace
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index d1a9f19..95ab98d 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -114,10 +114,12 @@ using views::View;
namespace {
+#if !defined(OS_CHROMEOS)
Browser* GetBrowserFromDelegate(LocationBarView::Delegate* delegate) {
WebContents* contents = delegate->GetWebContents();
return contents ? chrome::FindBrowserWithWebContents(contents) : NULL;
}
+#endif
// Given a containing |height| and a |base_font_list|, shrinks the font size
// until the font list will fit within |height| while having its cap height
diff --git a/chrome/browser/ui/views/panels/panel_frame_view.cc b/chrome/browser/ui/views/panels/panel_frame_view.cc
index 4b81d3d..87b17c1 100644
--- a/chrome/browser/ui/views/panels/panel_frame_view.cc
+++ b/chrome/browser/ui/views/panels/panel_frame_view.cc
@@ -68,6 +68,7 @@ gfx::ImageSkia* CreateImageForColor(SkColor color) {
return new gfx::ImageSkia(canvas.ExtractImageRep());
}
+#if defined(OS_WIN)
const gfx::ImageSkia& GetTopLeftCornerImage(panel::CornerStyle corner_style) {
static gfx::ImageSkia* rounded_image = NULL;
static gfx::ImageSkia* non_rounded_image = NULL;
@@ -153,6 +154,7 @@ const gfx::ImageSkia& GetRightEdgeImage() {
}
return *image;
}
+#endif // defined(OS_WIN)
const gfx::Font& GetTitleFont() {
static gfx::Font* font = NULL;
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 0a49b54..73283cf 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -282,21 +282,6 @@ void DrawIconCenter(gfx::Canvas* canvas,
icon_height, filter, paint);
}
-// Draws the icon image at the bottom right corner of |bounds|.
-void DrawIconBottomRight(gfx::Canvas* canvas,
- const gfx::ImageSkia& image,
- int image_offset,
- int icon_width,
- int icon_height,
- const gfx::Rect& bounds,
- bool filter,
- const SkPaint& paint) {
- int dst_x = bounds.x() + bounds.width() - icon_width;
- int dst_y = bounds.y() + bounds.height() - icon_height;
- DrawIconAtLocation(canvas, image, image_offset, dst_x, dst_y, icon_width,
- icon_height, filter, paint);
-}
-
chrome::HostDesktopType GetHostDesktopType(views::View* view) {
// Widget is NULL when tabs are detached.
views::Widget* widget = view->GetWidget();
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index a4979ba..b9c37c0 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -158,6 +158,7 @@ WebUIController* NewWebUI(WebUI* web_ui, const GURL& url) {
return new T(web_ui);
}
+#if defined(ENABLE_EXTENSIONS)
// Special cases for extensions.
template<>
WebUIController* NewWebUI<ExtensionWebUI>(WebUI* web_ui,
@@ -170,6 +171,7 @@ WebUIController* NewWebUI<extensions::ExtensionInfoUI>(WebUI* web_ui,
const GURL& url) {
return new extensions::ExtensionInfoUI(web_ui, url);
}
+#endif // defined(ENABLE_EXTENSIONS)
// Special case for older about: handlers.
template<>
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index ee8a8a5..bc249e1 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -81,22 +81,6 @@ const char kEnrollmentHTMLPath[] = "enrollment.html";
const char kEnrollmentCSSPath[] = "enrollment.css";
const char kEnrollmentJSPath[] = "enrollment.js";
-// Filter handler of chrome://oobe data source.
-bool HandleRequestCallback(
- const std::string& path,
- const content::WebUIDataSource::GotDataCallback& callback) {
- if (UserManager::Get()->IsUserLoggedIn() &&
- !UserManager::Get()->IsLoggedInAsStub() &&
- !ScreenLocker::default_screen_locker()) {
- scoped_refptr<base::RefCountedBytes> empty_bytes =
- new base::RefCountedBytes();
- callback.Run(empty_bytes.get());
- return true;
- }
-
- return false;
-}
-
// Creates a WebUIDataSource for chrome://oobe
content::WebUIDataSource* CreateOobeUIDataSource(
const base::DictionaryValue& localized_strings,
diff --git a/chrome/browser/ui/webui/instant_ui.cc b/chrome/browser/ui/webui/instant_ui.cc
index cc67fb4..6326e9f 100644
--- a/chrome/browser/ui/webui/instant_ui.cc
+++ b/chrome/browser/ui/webui/instant_ui.cc
@@ -33,6 +33,7 @@ content::WebUIDataSource* CreateInstantHTMLSource() {
return source;
}
+#if !defined(OS_ANDROID)
std::string FormatTime(int64 time) {
base::Time::Exploded exploded;
base::Time::FromInternalValue(time).UTCExplode(&exploded);
@@ -40,6 +41,7 @@ std::string FormatTime(int64 time) {
exploded.year, exploded.month, exploded.day_of_month,
exploded.hour, exploded.minute, exploded.second, exploded.millisecond);
}
+#endif // !defined(OS_ANDROID)
// This class receives JavaScript messages from the renderer.
// Note that the WebUI infrastructure runs on the UI thread, therefore all of
diff --git a/chrome/renderer/printing/print_web_view_helper_browsertest.cc b/chrome/renderer/printing/print_web_view_helper_browsertest.cc
index 48de217..7a3953f 100644
--- a/chrome/renderer/printing/print_web_view_helper_browsertest.cc
+++ b/chrome/renderer/printing/print_web_view_helper_browsertest.cc
@@ -80,7 +80,6 @@ const char kLongPageHTML[] =
// A web page to simulate the print preview page.
const char kPrintPreviewHTML[] =
"<body><p id=\"pdf-viewer\">Hello World!</p></body>";
-#endif // !defined(OS_CHROMEOS)
void CreatePrintSettingsDictionary(base::DictionaryValue* dict) {
dict->SetBoolean(kSettingLandscape, false);
@@ -100,6 +99,7 @@ void CreatePrintSettingsDictionary(base::DictionaryValue* dict) {
dict->SetBoolean(kSettingShouldPrintBackgrounds, false);
dict->SetBoolean(kSettingShouldPrintSelectionOnly, false);
}
+#endif // !defined(OS_CHROMEOS)
} // namespace
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 18a75dc..5a273b6 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -151,14 +151,12 @@ class TestExtensionURLRequestContextGetter
scoped_ptr<net::URLRequestContext> context_;
};
+#if defined(ENABLE_NOTIFICATIONS)
BrowserContextKeyedService* CreateTestDesktopNotificationService(
content::BrowserContext* profile) {
-#if defined(ENABLE_NOTIFICATIONS)
return new DesktopNotificationService(static_cast<Profile*>(profile), NULL);
-#else
- return NULL;
-#endif
}
+#endif
} // namespace
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index 19ab3d6..c968d80e 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -26,11 +26,6 @@ namespace chromeos {
namespace {
-void ErrorFunction(const std::string& error_name,
- const std::string& error_message) {
- LOG(ERROR) << "Shill Error: " << error_name << " : " << error_message;
-}
-
void PassStubListValue(const ShillServiceClient::ListValueCallback& callback,
base::ListValue* value) {
callback.Run(*value);
diff --git a/chromeos/ime/ibus_daemon_controller.cc b/chromeos/ime/ibus_daemon_controller.cc
index 01cd583..7febb2b 100644
--- a/chromeos/ime/ibus_daemon_controller.cc
+++ b/chromeos/ime/ibus_daemon_controller.cc
@@ -17,41 +17,6 @@ namespace chromeos {
namespace {
IBusDaemonController* g_ibus_daemon_controller = NULL;
-base::FilePathWatcher* g_file_path_watcher = NULL;
-
-// Called when the ibus-daemon address file is modified.
-static void OnFilePathChanged(
- const scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- const base::Closure& closure,
- const base::FilePath& file_path,
- bool failed) {
- if (failed)
- return; // Can't recover, do nothing.
- if (!g_file_path_watcher)
- return; // Already discarded watch task.
-
- ui_task_runner->PostTask(FROM_HERE, closure);
- ui_task_runner->DeleteSoon(FROM_HERE, g_file_path_watcher);
- g_file_path_watcher = NULL;
-}
-
-// Start watching |address_file_path|. If the target file is changed, |callback|
-// is called on UI thread. This function should be called on FILE thread.
-void StartWatch(
- const std::string& address_file_path,
- const base::Closure& closure,
- const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner) {
- // Before start watching, discard on-going watching task.
- delete g_file_path_watcher;
- g_file_path_watcher = new base::FilePathWatcher;
- bool result = g_file_path_watcher->Watch(
- base::FilePath::FromUTF8Unsafe(address_file_path),
- false, // do not watch child directory.
- base::Bind(&OnFilePathChanged,
- ui_task_runner,
- closure));
- DCHECK(result);
-}
// An implementation of IBusDaemonController without ibus-daemon interaction.
// Currently this class is used only on linux desktop.
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc
index 29e58ac..d1d4c52 100644
--- a/chromeos/network/onc/onc_validator.cc
+++ b/chromeos/network/onc/onc_validator.cc
@@ -20,12 +20,6 @@ namespace onc {
namespace {
-std::string ValueToString(const base::Value& value) {
- std::string json;
- base::JSONWriter::Write(&value, &json);
- return json;
-}
-
// Copied from policy/configuration_policy_handler.cc.
// TODO(pneubeck): move to a common place like base/.
std::string ValueTypeToString(base::Value::Type type) {
diff --git a/content/renderer/webcrypto/webcrypto_impl_unittest.cc b/content/renderer/webcrypto/webcrypto_impl_unittest.cc
index e0d215e..ffe2377 100644
--- a/content/renderer/webcrypto/webcrypto_impl_unittest.cc
+++ b/content/renderer/webcrypto/webcrypto_impl_unittest.cc
@@ -80,6 +80,7 @@ blink::WebCryptoAlgorithm CreateAesCbcAlgorithm(
new blink::WebCryptoAesKeyGenParams(key_length_bits));
}
+#if !defined(USE_OPENSSL)
blink::WebCryptoAlgorithm CreateRsaAlgorithm(
blink::WebCryptoAlgorithmId algorithm_id,
unsigned modulus_length,
@@ -92,6 +93,7 @@ blink::WebCryptoAlgorithm CreateRsaAlgorithm(
new blink::WebCryptoRsaKeyGenParams(
modulus_length, Start(public_exponent), public_exponent.size()));
}
+#endif // !defined(USE_OPENSSL)
} // namespace
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 17d03ba..45cd2f9 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -55,7 +55,7 @@ namespace {
ShellContentBrowserClient* g_browser_client;
bool g_swap_processes_for_redirect = false;
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
const std::string& process_type) {
base::FilePath dumps_path =
@@ -108,7 +108,7 @@ int GetCrashSignalFD(const CommandLine& command_line) {
return -1;
}
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
} // namespace
diff --git a/gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc b/gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc
index fa91220..dcf4c1b 100644
--- a/gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc
+++ b/gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc
@@ -48,6 +48,7 @@ class GLVirtualContextsTest : public testing::Test {
namespace {
+#if !defined(OS_ANDROID)
void SetupSimpleShader(const uint8* color) {
static const char* v_shader_str = SHADER(
attribute vec4 a_Position;
@@ -90,6 +91,8 @@ void TestDraw(int size) {
glDrawArrays(GL_TRIANGLES, 0, 6);
}
+#endif // !defined(OS_ANDROID)
+
} // anonymous namespace
// http://crbug.com/281565
diff --git a/net/ssl/server_bound_cert_service_unittest.cc b/net/ssl/server_bound_cert_service_unittest.cc
index fc25b0b..4df0039 100644
--- a/net/ssl/server_bound_cert_service_unittest.cc
+++ b/net/ssl/server_bound_cert_service_unittest.cc
@@ -24,6 +24,7 @@ namespace net {
namespace {
+#if !defined(USE_OPENSSL)
void FailTest(int /* result */) {
FAIL();
}
@@ -50,18 +51,6 @@ class FailingTaskRunner : public base::TaskRunner {
DISALLOW_COPY_AND_ASSIGN(FailingTaskRunner);
};
-class ServerBoundCertServiceTest : public testing::Test {
- public:
- ServerBoundCertServiceTest()
- : service_(new ServerBoundCertService(
- new DefaultServerBoundCertStore(NULL),
- base::MessageLoopProxy::current())) {
- }
-
- protected:
- scoped_ptr<ServerBoundCertService> service_;
-};
-
class MockServerBoundCertStoreWithAsyncGet
: public DefaultServerBoundCertStore {
public:
@@ -128,6 +117,20 @@ MockServerBoundCertStoreWithAsyncGet::CallGetServerBoundCertCallbackWithResult(
cert));
}
+#endif // !defined(USE_OPENSSL)
+
+class ServerBoundCertServiceTest : public testing::Test {
+ public:
+ ServerBoundCertServiceTest()
+ : service_(new ServerBoundCertService(
+ new DefaultServerBoundCertStore(NULL),
+ base::MessageLoopProxy::current())) {
+ }
+
+ protected:
+ scoped_ptr<ServerBoundCertService> service_;
+};
+
TEST_F(ServerBoundCertServiceTest, GetDomainForHost) {
EXPECT_EQ("google.com",
ServerBoundCertService::GetDomainForHost("google.com"));
diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc
index a9ac98b..bf66bea 100644
--- a/net/test/python_utils.cc
+++ b/net/test/python_utils.cc
@@ -41,6 +41,7 @@ void AppendToPythonPath(const base::FilePath& dir) {
namespace {
+#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
// Search for |to_try|, rolling up the directory tree from
// |start_dir|. If found, return true and put the path to |to_try| in
// |out_dir|. If not, return false and leave |out_dir| untouched.
@@ -59,6 +60,7 @@ bool TryRelativeToDir(const base::FilePath& start_dir,
*out_dir = dir;
return true;
}
+#endif // defined(OS_MACOSX) || defined(OS_CHROMEOS)
} // namespace
diff --git a/net/tools/balsa/balsa_frame.cc b/net/tools/balsa/balsa_frame.cc
index 1103ef1..96e9193 100644
--- a/net/tools/balsa/balsa_frame.cc
+++ b/net/tools/balsa/balsa_frame.cc
@@ -745,44 +745,11 @@ void ProcessChunkExtensionsManual(base::StringPiece all_extensions,
}
}
-// TODO(phython): Fix this function to properly deal with quoted values.
-// E.g. ";;foo", "\";;\"", or \"aa;
-// The last example, the semi-colon is a separator between extensions.
-void ProcessChunkExtensionsGoogle3(const char* input, size_t size,
- BalsaHeaders* extensions) {
- std::vector<base::StringPiece> key_values;
- SplitStringPieceToVector(base::StringPiece(input, size), ";",
- &key_values, true);
- for (unsigned int i = 0; i < key_values.size(); ++i) {
- base::StringPiece key = key_values[i].substr(0, key_values[i].find('='));
- base::StringPiece value;
- if (key.length() < key_values[i].length()) {
- value = key_values[i].substr(key.length() + 1);
- // Remove any leading and trailing whitespace.
- StringPieceUtils::RemoveWhitespaceContext(&value);
-
- // Strip quotation marks if they exist.
- if (!value.empty() && value[0] == '"')
- value.remove_prefix(1);
- if (!value.empty() && value[value.length() - 1] == '"')
- value.remove_suffix(1);
- }
-
- // Strip the key whitespace after checking that there is a value.
- StringPieceUtils::RemoveWhitespaceContext(&key);
- extensions->AppendHeader(key, value);
- }
-}
-
} // anonymous namespace
void BalsaFrame::ProcessChunkExtensions(const char* input, size_t size,
BalsaHeaders* extensions) {
-#if 0
- ProcessChunkExtensionsGoogle3(input, size, extensions);
-#else
ProcessChunkExtensionsManual(base::StringPiece(input, size), extensions);
-#endif
}
void BalsaFrame::ProcessHeaderLines() {
diff --git a/net/tools/quic/quic_time_wait_list_manager_test.cc b/net/tools/quic/quic_time_wait_list_manager_test.cc
index 92d1fc4..8b4614b 100644
--- a/net/tools/quic/quic_time_wait_list_manager_test.cc
+++ b/net/tools/quic/quic_time_wait_list_manager_test.cc
@@ -154,23 +154,6 @@ class ValidatePublicResetPacketPredicate
QuicPacketSequenceNumber sequence_number_;
};
-void ValidPublicResetPacketPredicate(
- QuicGuid expected_guid,
- QuicPacketSequenceNumber expected_sequence_number,
- const std::tr1::tuple<const char*, int>& packet_buffer) {
- FramerVisitorCapturingPublicReset visitor;
- QuicFramer framer(QuicSupportedVersions(), QuicTime::Zero(), false);
- framer.set_visitor(&visitor);
- QuicEncryptedPacket encrypted(std::tr1::get<0>(packet_buffer),
- std::tr1::get<1>(packet_buffer));
- framer.ProcessPacket(encrypted);
- QuicPublicResetPacket packet = visitor.public_reset_packet();
- EXPECT_EQ(expected_guid, packet.public_header.guid);
- EXPECT_TRUE(packet.public_header.reset_flag);
- EXPECT_FALSE(packet.public_header.version_flag);
- EXPECT_EQ(expected_sequence_number, packet.rejected_sequence_number);
-}
-
Matcher<const std::tr1::tuple<const char*, int> > PublicResetPacketEq(
QuicGuid guid,
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
index 49fdd86..f5de6af 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
@@ -38,21 +38,11 @@ namespace {
const int kExpectedExitCode = 100;
-template <class T>
-int popcount(T x);
-template <>
-int popcount<unsigned int>(unsigned int x) {
+int popcount(uint32_t x) {
return __builtin_popcount(x);
}
-template <>
-int popcount<unsigned long>(unsigned long x) {
- return __builtin_popcountl(x);
-}
-template <>
-int popcount<unsigned long long>(unsigned long long x) {
- return __builtin_popcountll(x);
-}
+#if !defined(NDEBUG)
void WriteFailedStderrSetupMessage(int out_fd) {
const char* error_string = strerror(errno);
static const char msg[] =
@@ -64,6 +54,7 @@ void WriteFailedStderrSetupMessage(int out_fd) {
HANDLE_EINTR(write(out_fd, "\n", 1))) {
}
}
+#endif // !defined(NDEBUG)
// We define a really simple sandbox policy. It is just good enough for us
// to tell that the sandbox has actually been activated.
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index af20138..ec724ac 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -126,46 +126,6 @@ void SelectEventsForRootWindow() {
#endif
}
-// We emulate Windows' WM_KEYDOWN and WM_CHAR messages. WM_CHAR events are only
-// generated for certain keys; see
-// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646268.aspx. Per
-// discussion on http://crbug.com/108480, char events should furthermore not be
-// generated for Tab, Escape, and Backspace.
-bool ShouldSendCharEventForKeyboardCode(ui::KeyboardCode keycode) {
- if ((keycode >= ui::VKEY_0 && keycode <= ui::VKEY_9) ||
- (keycode >= ui::VKEY_A && keycode <= ui::VKEY_Z) ||
- (keycode >= ui::VKEY_NUMPAD0 && keycode <= ui::VKEY_NUMPAD9)) {
- return true;
- }
-
- switch (keycode) {
- case ui::VKEY_RETURN:
- case ui::VKEY_SPACE:
- // In addition to the keys listed at MSDN, we include other
- // graphic-character and numpad keys.
- case ui::VKEY_MULTIPLY:
- case ui::VKEY_ADD:
- case ui::VKEY_SUBTRACT:
- case ui::VKEY_DECIMAL:
- case ui::VKEY_DIVIDE:
- case ui::VKEY_OEM_1:
- case ui::VKEY_OEM_2:
- case ui::VKEY_OEM_3:
- case ui::VKEY_OEM_4:
- case ui::VKEY_OEM_5:
- case ui::VKEY_OEM_6:
- case ui::VKEY_OEM_7:
- case ui::VKEY_OEM_102:
- case ui::VKEY_OEM_PLUS:
- case ui::VKEY_OEM_COMMA:
- case ui::VKEY_OEM_MINUS:
- case ui::VKEY_OEM_PERIOD:
- return true;
- default:
- return false;
- }
-}
-
bool default_override_redirect = false;
} // namespace
diff --git a/ui/gfx/interpolated_transform_unittest.cc b/ui/gfx/interpolated_transform_unittest.cc
index acea465..5215a8b 100644
--- a/ui/gfx/interpolated_transform_unittest.cc
+++ b/ui/gfx/interpolated_transform_unittest.cc
@@ -19,16 +19,6 @@ void CheckApproximatelyEqual(const gfx::Transform& lhs,
}
}
-float NormalizeAngle(float angle) {
- while (angle < 0.0f) {
- angle += 360.0f;
- }
- while (angle > 360.0f) {
- angle -= 360.0f;
- }
- return angle;
-}
-
} // namespace
TEST(InterpolatedTransformTest, InterpolatedRotation) {
diff --git a/ui/snapshot/test/run_all_unittests.cc b/ui/snapshot/test/run_all_unittests.cc
index 1dd759f..238e0be 100644
--- a/ui/snapshot/test/run_all_unittests.cc
+++ b/ui/snapshot/test/run_all_unittests.cc
@@ -9,6 +9,7 @@
namespace {
+#if !defined(USE_AURA)
class NoAtExitBaseTestSuite : public base::TestSuite {
public:
NoAtExitBaseTestSuite(int argc, char** argv)
@@ -19,6 +20,7 @@ class NoAtExitBaseTestSuite : public base::TestSuite {
int RunTestSuite(int argc, char** argv) {
return NoAtExitBaseTestSuite(argc, argv).Run();
}
+#endif // !defined(USE_AURA)
} // namespace
@@ -30,6 +32,7 @@ int main(int argc, char** argv) {
argc, argv, base::Bind(&ui::test::CompositorTestSuite::Run,
base::Unretained(&test_suite)));
#else
+
#if !defined(OS_ANDROID)
base::AtExitManager at_exit;
#endif
diff --git a/ui/views/controls/menu/menu_image_util.cc b/ui/views/controls/menu/menu_image_util.cc
index 2a585cb..a50980b 100644
--- a/ui/views/controls/menu/menu_image_util.cc
+++ b/ui/views/controls/menu/menu_image_util.cc
@@ -98,11 +98,6 @@ class RadioButtonImageSource : public gfx::CanvasImageSource {
DISALLOW_COPY_AND_ASSIGN(RadioButtonImageSource);
};
-gfx::ImageSkia* CreateRadioButtonImage(bool selected) {
- RadioButtonImageSource* source = new RadioButtonImageSource(selected);
- return new gfx::ImageSkia(source, source->size());
-}
-
class SubmenuArrowImageSource : public gfx::CanvasImageSource {
public:
SubmenuArrowImageSource(int image_id)
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 92f4b99..ba6954d 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -973,6 +973,7 @@ void Widget::NotifyLocaleChanged() {
}
namespace {
+#if defined(OS_WIN) || (defined(USE_X11) && !defined(OS_CHROMEOS))
void CloseWindow(aura::Window* window) {
if (window) {
Widget* widget = Widget::GetWidgetForNativeView(window);
@@ -984,6 +985,8 @@ void CloseWindow(aura::Window* window) {
widget->CloseNow();
}
}
+#endif
+
#if defined(OS_WIN)
BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) {
aura::Window* root_window =