diff options
Diffstat (limited to 'chrome/browser')
12 files changed, 45 insertions, 30 deletions
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index f07fbf2..b54ef03 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -8,6 +8,7 @@ #include <set> +#include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/message_loop_helpers.h" #include "base/observer_list.h" diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc index 2e4b7f8..ec814e9 100644 --- a/chrome/browser/chromeos/login/login_performer.cc +++ b/chrome/browser/chromeos/login/login_performer.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/metrics/histogram.h" +#include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/boot_times_loader.h" @@ -418,24 +419,24 @@ void LoginPerformer::ResolveInitialNetworkAuthFailure() { void LoginPerformer::ResolveLockLoginFailure() { if (last_login_failure_.reason() == LoginFailure::LOGIN_TIMED_OUT) { - LOG(WARNING) << "Online login timed out - unlocking screen. " - << "Granting user access based on offline auth only."; - RequestScreenUnlock(); - return; - } else if (last_login_failure_.reason() == - LoginFailure::NETWORK_AUTH_FAILED) { - ResolveLockNetworkAuthFailure(); - return; - } else if (last_login_failure_.reason() == - LoginFailure::COULD_NOT_MOUNT_CRYPTOHOME || - last_login_failure_.reason() == - LoginFailure::DATA_REMOVAL_FAILED) { - LOG(ERROR) << "Cryptohome error, forcing sign out."; - } else { - // COULD_NOT_MOUNT_TMPFS, UNLOCK_FAILED should not happen here. - NOTREACHED(); - } - ScreenLocker::default_screen_locker()->Signout(); + LOG(WARNING) << "Online login timed out - unlocking screen. " + << "Granting user access based on offline auth only."; + RequestScreenUnlock(); + return; + } else if (last_login_failure_.reason() == + LoginFailure::NETWORK_AUTH_FAILED) { + ResolveLockNetworkAuthFailure(); + return; + } else if (last_login_failure_.reason() == + LoginFailure::COULD_NOT_MOUNT_CRYPTOHOME || + last_login_failure_.reason() == + LoginFailure::DATA_REMOVAL_FAILED) { + LOG(ERROR) << "Cryptohome error, forcing sign out."; + } else { + // COULD_NOT_MOUNT_TMPFS, UNLOCK_FAILED should not happen here. + NOTREACHED(); + } + ScreenLocker::default_screen_locker()->Signout(); } void LoginPerformer::ResolveLockNetworkAuthFailure() { diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc index f249cf4..73651f1 100644 --- a/chrome/browser/extensions/extension_process_manager.cc +++ b/chrome/browser/extensions/extension_process_manager.cc @@ -4,18 +4,15 @@ #include "base/bind.h" #include "base/command_line.h" -#include "chrome/browser/extensions/extension_process_manager.h" - +#include "base/lazy_instance.h" #include "chrome/browser/extensions/extension_event_router.h" -#include "chrome/browser/ui/browser_window.h" -#if defined(OS_MACOSX) -#include "chrome/browser/extensions/extension_host_mac.h" -#endif +#include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_info_map.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_window.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_view_type.h" @@ -30,6 +27,10 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/renderer_preferences.h" +#if defined(OS_MACOSX) +#include "chrome/browser/extensions/extension_host_mac.h" +#endif + using content::BrowserThread; using content::OpenURLParams; using content::Referrer; @@ -263,7 +264,6 @@ ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension( return host; } return NULL; - } std::set<RenderViewHost*> @@ -332,7 +332,7 @@ int ExtensionProcessManager::DecrementLazyKeepaliveCount( return 0; int& count = ::GetLazyKeepaliveCount(GetProfile(), extension); - DCHECK(count > 0); + DCHECK_GT(count, 0); if (--count == 0) OnLazyBackgroundPageIdle(extension->id()); diff --git a/chrome/browser/extensions/key_identifier_conversion_views.cc b/chrome/browser/extensions/key_identifier_conversion_views.cc index c471f38..36dfd89 100644 --- a/chrome/browser/extensions/key_identifier_conversion_views.cc +++ b/chrome/browser/extensions/key_identifier_conversion_views.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,8 +6,11 @@ #include <string.h> +#include <utility> + #include "base/basictypes.h" #include "base/hash_tables.h" +#include "base/logging.h" #include "content/public/browser/browser_thread.h" #include "ui/base/keycodes/keyboard_codes.h" #include "ui/views/events/event.h" diff --git a/chrome/browser/prefs/pref_member.h b/chrome/browser/prefs/pref_member.h index 38c785a..d97438b 100644 --- a/chrome/browser/prefs/pref_member.h +++ b/chrome/browser/prefs/pref_member.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -29,6 +29,7 @@ #include "base/basictypes.h" #include "base/file_path.h" +#include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/values.h" #include "content/public/browser/browser_thread.h" @@ -115,8 +116,8 @@ class PrefMemberBase : public content::NotificationObserver { virtual Internal* internal() const = 0; - // Ordered the members to compact the class instance. private: + // Ordered the members to compact the class instance. std::string pref_name_; content::NotificationObserver* observer_; PrefService* prefs_; diff --git a/chrome/browser/profiles/refcounted_profile_keyed_service_factory.cc b/chrome/browser/profiles/refcounted_profile_keyed_service_factory.cc index 56a273a..8bf694c 100644 --- a/chrome/browser/profiles/refcounted_profile_keyed_service_factory.cc +++ b/chrome/browser/profiles/refcounted_profile_keyed_service_factory.cc @@ -4,6 +4,7 @@ #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h" +#include "base/logging.h" #include "chrome/browser/profiles/profile_keyed_service.h" #include "chrome/browser/profiles/refcounted_profile_keyed_service.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h index 2cd68e9..fe574a8 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -30,8 +30,10 @@ #pragma once #include <map> +#include <string> #include <vector> +#include "base/gtest_prod_util.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "content/public/browser/interstitial_page_delegate.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.h b/chrome/browser/sync/glue/non_frontend_data_type_controller.h index 7a357e7..28acfd1 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller.h +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.h @@ -12,6 +12,7 @@ #include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" #include "chrome/browser/sync/glue/data_type_controller.h" #include "chrome/browser/sync/glue/data_type_error_handler.h" @@ -59,6 +60,7 @@ class NonFrontendDataTypeController : public DataTypeController { virtual void OnSingleDatatypeUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) OVERRIDE; + protected: // For testing only. NonFrontendDataTypeController(); diff --git a/chrome/browser/ui/cocoa/dock_icon.mm b/chrome/browser/ui/cocoa/dock_icon.mm index 9fe0316..7e86cdf 100644 --- a/chrome/browser/ui/cocoa/dock_icon.mm +++ b/chrome/browser/ui/cocoa/dock_icon.mm @@ -4,6 +4,7 @@ #import "chrome/browser/ui/cocoa/dock_icon.h" +#include "base/logging.h" #include "base/mac/bundle_locations.h" #include "base/memory/scoped_nsobject.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc b/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc index 098b878..548c5f9 100644 --- a/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc +++ b/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc @@ -13,6 +13,7 @@ #include "base/process_util.h" #include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/ui/gtk/select_file_dialog_impl.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc index 62a7678..f9a21d1 100644 --- a/chrome/browser/web_applications/web_app_linux.cc +++ b/chrome/browser/web_applications/web_app_linux.cc @@ -5,6 +5,7 @@ #include "chrome/browser/web_applications/web_app.h" #include "base/environment.h" +#include "base/logging.h" #include "content/public/browser/browser_thread.h" namespace web_app { diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc index e8a04e4..6e076b9 100644 --- a/chrome/browser/web_applications/web_app_win.cc +++ b/chrome/browser/web_applications/web_app_win.cc @@ -8,6 +8,7 @@ #include "base/command_line.h" #include "base/file_util.h" +#include "base/logging.h" #include "base/md5.h" #include "base/path_service.h" #include "base/stringprintf.h" |