summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:10:45 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 20:10:45 +0000
commitddb1e5ae096bd91da721887fd55e68c603bf7067 (patch)
tree401d9a379ff03bb8b69a1ce9c23fe182f673f587 /chrome/browser
parent1c9526e0650a91e412d815417634c9f193b1a4d5 (diff)
downloadchromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.zip
chromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.tar.gz
chromium_src-ddb1e5ae096bd91da721887fd55e68c603bf7067.tar.bz2
Even more virtual method deinlining.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.h2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.h2
-rw-r--r--chrome/browser/autofill/credit_card.cc4
-rw-r--r--chrome/browser/autofill/credit_card.h2
-rw-r--r--chrome/browser/autofill/fax_number.cc33
-rw-r--r--chrome/browser/autofill/fax_number.h30
-rw-r--r--chrome/browser/autofill/form_field.cc4
-rw-r--r--chrome/browser/autofill/form_field.h2
-rw-r--r--chrome/browser/autofill/home_address.cc41
-rw-r--r--chrome/browser/autofill/home_address.h39
-rw-r--r--chrome/browser/autofill/name_field.cc11
-rw-r--r--chrome/browser/autofill/name_field.h9
-rw-r--r--chrome/browser/autofill/personal_data_manager.cc12
-rw-r--r--chrome/browser/autofill/personal_data_manager.h10
-rw-r--r--chrome/browser/bookmarks/base_bookmark_model_observer.cc51
-rw-r--r--chrome/browser/bookmarks/base_bookmark_model_observer.h29
-rw-r--r--chrome/browser/cookies_tree_model.cc116
-rw-r--r--chrome/browser/cookies_tree_model.h108
-rw-r--r--chrome/browser/debugger/devtools_client_host.cc16
-rw-r--r--chrome/browser/debugger/devtools_client_host.h9
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket.cc4
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket.h2
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/debugger/devtools_window.h2
-rw-r--r--chrome/browser/dom_ui/history_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.h4
-rw-r--r--chrome/browser/download/download_shelf.cc4
-rw-r--r--chrome/browser/download/download_shelf.h2
-rw-r--r--chrome/browser/extensions/extension_host.cc16
-rw-r--r--chrome/browser/extensions/extension_host.h10
-rw-r--r--chrome/browser/extensions/extensions_service.cc20
-rw-r--r--chrome/browser/extensions/extensions_service.h16
-rw-r--r--chrome/browser/gtk/browser_actions_toolbar_gtk.cc14
-rw-r--r--chrome/browser/gtk/browser_actions_toolbar_gtk.h8
-rw-r--r--chrome/browser/plugin_process_host.cc4
-rw-r--r--chrome/browser/plugin_process_host.h2
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc4
-rw-r--r--chrome/browser/renderer_host/render_view_host.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc10
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h6
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc5
-rw-r--r--chrome/browser/sidebar/sidebar_container.h2
-rw-r--r--chrome/browser/sync/engine/model_changing_syncer_command.cc5
-rw-r--r--chrome/browser/sync/engine/model_changing_syncer_command.h4
-rw-r--r--chrome/browser/sync/engine/net/server_connection_manager.cc4
-rw-r--r--chrome/browser/sync/engine/net/server_connection_manager.h4
-rw-r--r--chrome/browser/sync/engine/syncer_thread.cc20
-rw-r--r--chrome/browser/sync/engine/syncer_thread.h20
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc6
-rw-r--r--chrome/browser/sync/glue/session_model_associator.h6
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.cc4
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.h2
-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/tab_closeable_state_watcher.cc8
-rw-r--r--chrome/browser/tab_closeable_state_watcher.h8
-rw-r--r--chrome/browser/tab_contents/background_contents.cc12
-rw-r--r--chrome/browser/tab_contents/background_contents.h6
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.cc96
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h79
-rw-r--r--chrome/browser/themes/browser_theme_provider.cc4
-rw-r--r--chrome/browser/themes/browser_theme_provider.h2
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc4
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h2
-rw-r--r--chrome/browser/utility_process_host.cc10
-rw-r--r--chrome/browser/utility_process_host.h6
70 files changed, 701 insertions, 314 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 8d31941..37de68d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -36,6 +36,10 @@
///////////////////////////////////////////////////////////////////////////////
// AutocompleteEditController
+bool AutocompleteEditController::AcceptCurrentInstantPreview() {
+ return false;
+}
+
AutocompleteEditController::~AutocompleteEditController() {
}
diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h
index 983a5f5..4f0b5d8 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -52,7 +52,7 @@ class AutocompleteEditController {
// Accepts the currently showing instant preview, if any, and returns true.
// Returns false if there is no instant preview showing.
- virtual bool AcceptCurrentInstantPreview() { return false; }
+ virtual bool AcceptCurrentInstantPreview();
// Sets the suggested search text to |suggested_text|.
virtual void OnSetSuggestedSearchText(const string16& suggested_text) = 0;
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
index ca70f1b..77b207a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
@@ -462,6 +462,14 @@ gfx::Font AutocompleteEditViewGtk::GetFont() {
rc_style->font_desc : text_view_->style->font_desc);
}
+AutocompleteEditModel* AutocompleteEditViewGtk::model() {
+ return model_.get();
+}
+
+const AutocompleteEditModel* AutocompleteEditViewGtk::model() const {
+ return model_.get();
+}
+
void AutocompleteEditViewGtk::SaveStateToTab(TabContents* tab) {
DCHECK(tab);
// If any text has been selected, register it as the PRIMARY selection so it
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index 21f4a93..66c7541 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -93,8 +93,8 @@ class AutocompleteEditViewGtk : public AutocompleteEditView,
gfx::Font GetFont();
// Implement the AutocompleteEditView interface.
- virtual AutocompleteEditModel* model() { return model_.get(); }
- virtual const AutocompleteEditModel* model() const { return model_.get(); }
+ virtual AutocompleteEditModel* model();
+ virtual const AutocompleteEditModel* model() const;
virtual void SaveStateToTab(TabContents* tab);
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index 8068c11..e7da263 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -337,6 +337,10 @@ AutocompletePopupViewGtk::~AutocompletePopupViewGtk() {
g_object_unref(it->second);
}
+bool AutocompletePopupViewGtk::IsOpen() const {
+ return opened_;
+}
+
void AutocompletePopupViewGtk::InvalidateLine(size_t line) {
// TODO(deanm): Is it possible to use some constant for the width, instead
// of having to query the width of the window?
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
index 590cc41..0632635 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
@@ -35,7 +35,7 @@ class AutocompletePopupViewGtk : public AutocompletePopupView,
~AutocompletePopupViewGtk();
// Overridden from AutocompletePopupView:
- virtual bool IsOpen() const { return opened_; }
+ virtual bool IsOpen() const;
virtual void InvalidateLine(size_t line);
virtual void UpdatePopupAppearance();
virtual gfx::Rect GetTargetBounds();
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index 1cd0c13..e8e0191 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -337,6 +337,10 @@ void CreditCard::SetInfo(const AutoFillType& type, const string16& value) {
}
}
+const string16 CreditCard::Label() const {
+ return label_;
+}
+
string16 CreditCard::ObfuscatedNumber() const {
if (number().empty())
return string16(); // No CC number, means empty preview.
diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h
index 9136b5e..ebb3161 100644
--- a/chrome/browser/autofill/credit_card.h
+++ b/chrome/browser/autofill/credit_card.h
@@ -32,7 +32,7 @@ class CreditCard : public FormGroup {
virtual string16 GetFieldText(const AutoFillType& type) const;
virtual string16 GetPreviewText(const AutoFillType& type) const;
virtual void SetInfo(const AutoFillType& type, const string16& value);
- virtual const string16 Label() const { return label_; }
+ virtual const string16 Label() const;
// The number altered for display, for example: ******1234
string16 ObfuscatedNumber() const;
diff --git a/chrome/browser/autofill/fax_number.cc b/chrome/browser/autofill/fax_number.cc
new file mode 100644
index 0000000..06dd781
--- /dev/null
+++ b/chrome/browser/autofill/fax_number.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/autofill/fax_number.h"
+
+FaxNumber::FaxNumber() {}
+
+FaxNumber::~FaxNumber() {}
+
+FormGroup* FaxNumber::Clone() const {
+ return new FaxNumber(*this);
+}
+
+AutoFillFieldType FaxNumber::GetNumberType() const {
+ return PHONE_FAX_NUMBER;
+}
+
+AutoFillFieldType FaxNumber::GetCityCodeType() const {
+ return PHONE_FAX_CITY_CODE;
+}
+
+AutoFillFieldType FaxNumber::GetCountryCodeType() const {
+ return PHONE_FAX_COUNTRY_CODE;
+}
+
+AutoFillFieldType FaxNumber::GetCityAndNumberType() const {
+ return PHONE_FAX_CITY_AND_NUMBER;
+}
+
+AutoFillFieldType FaxNumber::GetWholeNumberType() const {
+ return PHONE_FAX_WHOLE_NUMBER;
+}
diff --git a/chrome/browser/autofill/fax_number.h b/chrome/browser/autofill/fax_number.h
index 864746f..7fe9a1c 100644
--- a/chrome/browser/autofill/fax_number.h
+++ b/chrome/browser/autofill/fax_number.h
@@ -12,29 +12,17 @@ class FormGroup;
class FaxNumber : public PhoneNumber {
public:
- FaxNumber() {}
- virtual FormGroup* Clone() const { return new FaxNumber(*this); }
+ FaxNumber();
+ virtual ~FaxNumber();
- protected:
- virtual AutoFillFieldType GetNumberType() const {
- return PHONE_FAX_NUMBER;
- }
-
- virtual AutoFillFieldType GetCityCodeType() const {
- return PHONE_FAX_CITY_CODE;
- }
-
- virtual AutoFillFieldType GetCountryCodeType() const {
- return PHONE_FAX_COUNTRY_CODE;
- }
+ virtual FormGroup* Clone() const;
- virtual AutoFillFieldType GetCityAndNumberType() const {
- return PHONE_FAX_CITY_AND_NUMBER;
- }
-
- virtual AutoFillFieldType GetWholeNumberType() const {
- return PHONE_FAX_WHOLE_NUMBER;
- }
+ protected:
+ virtual AutoFillFieldType GetNumberType() const;
+ virtual AutoFillFieldType GetCityCodeType() const;
+ virtual AutoFillFieldType GetCountryCodeType() const;
+ virtual AutoFillFieldType GetCityAndNumberType() const;
+ virtual AutoFillFieldType GetWholeNumberType() const;
private:
explicit FaxNumber(const FaxNumber& phone) : PhoneNumber(phone) {}
diff --git a/chrome/browser/autofill/form_field.cc b/chrome/browser/autofill/form_field.cc
index 95b1e55..6bf3e24 100644
--- a/chrome/browser/autofill/form_field.cc
+++ b/chrome/browser/autofill/form_field.cc
@@ -105,6 +105,10 @@ class EmailField : public FormField {
AutoFillField* field_;
};
+FormFieldType FormField::GetFormFieldType() const {
+ return kOtherFieldType;
+}
+
// static
bool FormField::Match(AutoFillField* field,
const string16& pattern,
diff --git a/chrome/browser/autofill/form_field.h b/chrome/browser/autofill/form_field.h
index 38b2ec2..4c5e02b 100644
--- a/chrome/browser/autofill/form_field.h
+++ b/chrome/browser/autofill/form_field.h
@@ -75,7 +75,7 @@ class FormField {
virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const = 0;
// Returns the type of form field of the class implementing this interface.
- virtual FormFieldType GetFormFieldType() const { return kOtherFieldType; }
+ virtual FormFieldType GetFormFieldType() const;
// Returns true if |field| contains the regexp |pattern| in the name or label.
// If |match_label_only| is true, then only the field's label is considered.
diff --git a/chrome/browser/autofill/home_address.cc b/chrome/browser/autofill/home_address.cc
new file mode 100644
index 0000000..5c036a1
--- /dev/null
+++ b/chrome/browser/autofill/home_address.cc
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/autofill/home_address.h"
+
+HomeAddress::HomeAddress() {}
+
+HomeAddress::~HomeAddress() {}
+
+FormGroup* HomeAddress::Clone() const {
+ return new HomeAddress(*this);
+}
+
+AutoFillFieldType HomeAddress::GetLine1Type() const {
+ return ADDRESS_HOME_LINE1;
+}
+
+AutoFillFieldType HomeAddress::GetLine2Type() const {
+ return ADDRESS_HOME_LINE2;
+}
+
+AutoFillFieldType HomeAddress::GetAptNumType() const {
+ return ADDRESS_HOME_APT_NUM;
+}
+
+AutoFillFieldType HomeAddress::GetCityType() const {
+ return ADDRESS_HOME_CITY;
+}
+
+AutoFillFieldType HomeAddress::GetStateType() const {
+ return ADDRESS_HOME_STATE;
+}
+
+AutoFillFieldType HomeAddress::GetZipCodeType() const {
+ return ADDRESS_HOME_ZIP;
+}
+
+AutoFillFieldType HomeAddress::GetCountryType() const {
+ return ADDRESS_HOME_COUNTRY;
+}
diff --git a/chrome/browser/autofill/home_address.h b/chrome/browser/autofill/home_address.h
index 3984f6b..9f441f5 100644
--- a/chrome/browser/autofill/home_address.h
+++ b/chrome/browser/autofill/home_address.h
@@ -14,37 +14,18 @@ class FormGroup;
// A specialization of Address that identifies itself as a home address.
class HomeAddress : public Address {
public:
- HomeAddress() {}
- virtual FormGroup* Clone() const { return new HomeAddress(*this); }
+ HomeAddress();
+ virtual ~HomeAddress();
+ virtual FormGroup* Clone() const;
protected:
- virtual AutoFillFieldType GetLine1Type() const {
- return ADDRESS_HOME_LINE1;
- }
-
- virtual AutoFillFieldType GetLine2Type() const {
- return ADDRESS_HOME_LINE2;
- }
-
- virtual AutoFillFieldType GetAptNumType() const {
- return ADDRESS_HOME_APT_NUM;
- }
-
- virtual AutoFillFieldType GetCityType() const {
- return ADDRESS_HOME_CITY;
- }
-
- virtual AutoFillFieldType GetStateType() const {
- return ADDRESS_HOME_STATE;
- }
-
- virtual AutoFillFieldType GetZipCodeType() const {
- return ADDRESS_HOME_ZIP;
- }
-
- virtual AutoFillFieldType GetCountryType() const {
- return ADDRESS_HOME_COUNTRY;
- }
+ virtual AutoFillFieldType GetLine1Type() const;
+ virtual AutoFillFieldType GetLine2Type() const;
+ virtual AutoFillFieldType GetAptNumType() const;
+ virtual AutoFillFieldType GetCityType() const;
+ virtual AutoFillFieldType GetStateType() const;
+ virtual AutoFillFieldType GetZipCodeType() const;
+ virtual AutoFillFieldType GetCountryType() const;
private:
explicit HomeAddress(const HomeAddress& address) : Address(address) {}
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc
index 8163d7a..69a7b43 100644
--- a/chrome/browser/autofill/name_field.cc
+++ b/chrome/browser/autofill/name_field.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/autofill/name_field.h"
+#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -18,6 +19,12 @@ NameField* NameField::Parse(std::vector<AutoFillField*>::const_iterator* iter,
return field;
}
+bool FullNameField::GetFieldInfo(FieldTypeMap* field_type_map) const {
+ bool ok = Add(field_type_map, field_, AutoFillType(NAME_FULL));
+ DCHECK(ok);
+ return true;
+}
+
FullNameField* FullNameField::Parse(
std::vector<AutoFillField*>::const_iterator* iter) {
// Exclude labels containing the string "username", which typically
@@ -37,6 +44,10 @@ FullNameField* FullNameField::Parse(
return NULL;
}
+FullNameField::FullNameField(AutoFillField* field)
+ : field_(field) {
+}
+
FirstLastNameField* FirstLastNameField::Parse1(
std::vector<AutoFillField*>::const_iterator* iter) {
// Some pages (e.g. Overstock_comBilling.html, SmithsonianCheckout.html)
diff --git a/chrome/browser/autofill/name_field.h b/chrome/browser/autofill/name_field.h
index 7b16e77..0c6bd09 100644
--- a/chrome/browser/autofill/name_field.h
+++ b/chrome/browser/autofill/name_field.h
@@ -8,7 +8,6 @@
#include <vector>
-#include "base/logging.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/form_field.h"
@@ -28,17 +27,13 @@ class NameField : public FormField {
// A form field that can parse a full name field.
class FullNameField : public NameField {
public:
- virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const {
- bool ok = Add(field_type_map, field_, AutoFillType(NAME_FULL));
- DCHECK(ok);
- return true;
- }
+ virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const;
static FullNameField* Parse(
std::vector<AutoFillField*>::const_iterator* iter);
private:
- explicit FullNameField(AutoFillField* field) : field_(field) {}
+ explicit FullNameField(AutoFillField* field);
AutoFillField* field_;
DISALLOW_COPY_AND_ASSIGN(FullNameField);
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 09506b9..8554064 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -589,6 +589,10 @@ bool PersonalDataManager::HasPassword() {
return !password_hash_.empty();
}
+bool PersonalDataManager::IsDataLoaded() const {
+ return is_data_loaded_;
+}
+
const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() {
// |profile_| is NULL in AutoFillManagerTest.
bool auxiliary_profiles_enabled = profile_ ? profile_->GetPrefs()->GetBoolean(
@@ -611,6 +615,14 @@ const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() {
return profiles_;
}
+const std::vector<AutoFillProfile*>& PersonalDataManager::web_profiles() {
+ return web_profiles_.get();
+}
+
+const std::vector<CreditCard*>& PersonalDataManager::credit_cards() {
+ return credit_cards_.get();
+}
+
AutoFillProfile* PersonalDataManager::CreateNewEmptyAutoFillProfileForDBThread(
const string16& label) {
// See comment in header for thread details.
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index babbe42..f6f9df8 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -132,19 +132,15 @@ class PersonalDataManager
bool HasPassword();
// Returns whether the personal data has been loaded from the web database.
- virtual bool IsDataLoaded() const { return is_data_loaded_; }
+ virtual bool IsDataLoaded() const;
// This PersonalDataManager owns these profiles and credit cards. Their
// lifetime is until the web database is updated with new profile and credit
// card information, respectively. |profiles()| returns both web and
// auxiliary profiles. |web_profiles()| returns only web profiles.
const std::vector<AutoFillProfile*>& profiles();
- virtual const std::vector<AutoFillProfile*>& web_profiles() {
- return web_profiles_.get();
- }
- virtual const std::vector<CreditCard*>& credit_cards() {
- return credit_cards_.get();
- }
+ virtual const std::vector<AutoFillProfile*>& web_profiles();
+ virtual const std::vector<CreditCard*>& credit_cards();
// Creates a profile labeled |label|.
// This must be called on the DB thread with the expectation that the
diff --git a/chrome/browser/bookmarks/base_bookmark_model_observer.cc b/chrome/browser/bookmarks/base_bookmark_model_observer.cc
new file mode 100644
index 0000000..dfa4ba6
--- /dev/null
+++ b/chrome/browser/bookmarks/base_bookmark_model_observer.cc
@@ -0,0 +1,51 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
+
+void BaseBookmarkModelObserver::Loaded(BookmarkModel* model) {
+}
+
+void BaseBookmarkModelObserver::BookmarkModelBeingDeleted(
+ BookmarkModel* model) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeMoved(
+ BookmarkModel* model,
+ const BookmarkNode* old_parent,
+ int old_index,
+ const BookmarkNode* new_parent,
+ int new_index) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeAdded(BookmarkModel* model,
+ const BookmarkNode* parent,
+ int index) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeRemoved(BookmarkModel* model,
+ const BookmarkNode* parent,
+ int old_index,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeChanged(BookmarkModel* model,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeFavIconLoaded(
+ BookmarkModel* model,
+ const BookmarkNode* node) {
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeChildrenReordered(
+ BookmarkModel* model,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
diff --git a/chrome/browser/bookmarks/base_bookmark_model_observer.h b/chrome/browser/bookmarks/base_bookmark_model_observer.h
index 5a306aa..ff561af 100644
--- a/chrome/browser/bookmarks/base_bookmark_model_observer.h
+++ b/chrome/browser/bookmarks/base_bookmark_model_observer.h
@@ -18,40 +18,27 @@ class BaseBookmarkModelObserver : public BookmarkModelObserver {
virtual void BookmarkModelChanged() = 0;
- virtual void Loaded(BookmarkModel* model) {}
+ virtual void Loaded(BookmarkModel* model);
- virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {
- BookmarkModelChanged();
- }
+ virtual void BookmarkModelBeingDeleted(BookmarkModel* model);
virtual void BookmarkNodeMoved(BookmarkModel* model,
const BookmarkNode* old_parent,
int old_index,
const BookmarkNode* new_parent,
- int new_index) {
- BookmarkModelChanged();
- }
+ int new_index);
virtual void BookmarkNodeAdded(BookmarkModel* model,
const BookmarkNode* parent,
- int index) {
- BookmarkModelChanged();
- }
+ int index);
virtual void BookmarkNodeRemoved(BookmarkModel* model,
const BookmarkNode* parent,
int old_index,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeChanged(BookmarkModel* model,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
- const BookmarkNode* node) {
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
private:
DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver);
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 24e3c9a..ed3c8b4 100644
--- a/chrome/browser/cookies_tree_model.cc
+++ b/chrome/browser/cookies_tree_model.cc
@@ -51,6 +51,8 @@ CookieTreeCookieNode::CookieTreeCookieNode(
cookie_(cookie) {
}
+CookieTreeCookieNode::~CookieTreeCookieNode() {}
+
void CookieTreeCookieNode::DeleteStoredObjects() {
// notify CookieMonster that we should delete this cookie
// We have stored a copy of all the cookies in the model, and our model is
@@ -62,6 +64,12 @@ void CookieTreeCookieNode::DeleteStoredObjects() {
GetModel()->cookie_monster_->DeleteCanonicalCookie(*cookie_);
}
+CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_COOKIE,
+ cookie_, NULL, NULL, NULL, NULL, NULL);
+}
+
namespace {
// comparison functor, for use in CookieTreeRootNode
class OriginNodeComparator {
@@ -136,6 +144,12 @@ void CookieTreeAppCacheNode::DeleteStoredObjects() {
appcache_info_->manifest_url);
}
+CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_APPCACHE,
+ NULL, NULL, NULL, NULL, appcache_info_, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeDatabaseNode, public:
@@ -147,11 +161,19 @@ CookieTreeDatabaseNode::CookieTreeDatabaseNode(
database_info_(database_info) {
}
+CookieTreeDatabaseNode::~CookieTreeDatabaseNode() {}
+
void CookieTreeDatabaseNode::DeleteStoredObjects() {
GetModel()->database_helper_->DeleteDatabase(
database_info_->origin_identifier, database_info_->database_name);
}
+CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_DATABASE,
+ NULL, database_info_, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeLocalStorageNode, public:
@@ -164,11 +186,20 @@ CookieTreeLocalStorageNode::CookieTreeLocalStorageNode(
local_storage_info_(local_storage_info) {
}
+CookieTreeLocalStorageNode::~CookieTreeLocalStorageNode() {}
+
void CookieTreeLocalStorageNode::DeleteStoredObjects() {
GetModel()->local_storage_helper_->DeleteLocalStorageFile(
local_storage_info_->file_path);
}
+CookieTreeNode::DetailedInfo
+CookieTreeLocalStorageNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_LOCAL_STORAGE,
+ NULL, NULL, local_storage_info_, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeSessionStorageNode, public:
@@ -181,6 +212,15 @@ CookieTreeSessionStorageNode::CookieTreeSessionStorageNode(
session_storage_info_(session_storage_info) {
}
+CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeSessionStorageNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_SESSION_STORAGE,
+ NULL, NULL, NULL, session_storage_info_, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeIndexedDBNode, public:
@@ -193,14 +233,28 @@ CookieTreeIndexedDBNode::CookieTreeIndexedDBNode(
indexed_db_info_(indexed_db_info) {
}
+CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {}
+
void CookieTreeIndexedDBNode::DeleteStoredObjects() {
GetModel()->indexed_db_helper_->DeleteIndexedDBFile(
indexed_db_info_->file_path);
}
+CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_INDEXED_DB,
+ NULL, NULL, NULL, NULL, NULL, indexed_db_info_);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeRootNode, public:
+CookieTreeRootNode::CookieTreeRootNode(CookiesTreeModel* model)
+ : model_(model) {
+}
+
+CookieTreeRootNode::~CookieTreeRootNode() {}
+
CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode(
const GURL& url) {
CookieTreeOriginNode origin_node(url);
@@ -224,6 +278,16 @@ CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode(
return retval;
}
+CookiesTreeModel* CookieTreeRootNode::GetModel() const {
+ return model_;
+}
+
+CookieTreeNode::DetailedInfo CookieTreeRootNode::GetDetailedInfo() const {
+ return DetailedInfo(string16(),
+ DetailedInfo::TYPE_ROOT,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeOriginNode, public:
@@ -322,6 +386,15 @@ CookieTreeCookiesNode::CookieTreeCookiesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIES)) {
}
+CookieTreeCookiesNode::~CookieTreeCookiesNode() {
+}
+
+CookieTreeNode::DetailedInfo CookieTreeCookiesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_COOKIES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeAppCachesNode, public:
@@ -330,6 +403,14 @@ CookieTreeAppCachesNode::CookieTreeAppCachesNode()
IDS_COOKIES_APPLICATION_CACHES)) {
}
+CookieTreeAppCachesNode::~CookieTreeAppCachesNode() {}
+
+CookieTreeNode::DetailedInfo CookieTreeAppCachesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_APPCACHES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeDatabasesNode, public:
@@ -337,6 +418,14 @@ CookieTreeDatabasesNode::CookieTreeDatabasesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASES)) {
}
+CookieTreeDatabasesNode::~CookieTreeDatabasesNode() {}
+
+CookieTreeNode::DetailedInfo CookieTreeDatabasesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_DATABASES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeLocalStoragesNode, public:
@@ -344,6 +433,15 @@ CookieTreeLocalStoragesNode::CookieTreeLocalStoragesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE)) {
}
+CookieTreeLocalStoragesNode::~CookieTreeLocalStoragesNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeLocalStoragesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_LOCAL_STORAGES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeSessionStoragesNode, public:
@@ -351,6 +449,15 @@ CookieTreeSessionStoragesNode::CookieTreeSessionStoragesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_SESSION_STORAGE)) {
}
+CookieTreeSessionStoragesNode::~CookieTreeSessionStoragesNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeSessionStoragesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_SESSION_STORAGES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeIndexedDBsNode, public:
@@ -358,6 +465,15 @@ CookieTreeIndexedDBsNode::CookieTreeIndexedDBsNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_INDEXED_DB)) {
}
+CookieTreeIndexedDBsNode::~CookieTreeIndexedDBsNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeIndexedDBsNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_INDEXED_DBS,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeNode, protected
diff --git a/chrome/browser/cookies_tree_model.h b/chrome/browser/cookies_tree_model.h
index 16e4050..20b2a71 100644
--- a/chrome/browser/cookies_tree_model.h
+++ b/chrome/browser/cookies_tree_model.h
@@ -162,20 +162,16 @@ class CookieTreeNode : public TreeNode<CookieTreeNode> {
// The node at the root of the CookieTree that gets inserted into the view.
class CookieTreeRootNode : public CookieTreeNode {
public:
- explicit CookieTreeRootNode(CookiesTreeModel* model) : model_(model) {}
- virtual ~CookieTreeRootNode() {}
+ explicit CookieTreeRootNode(CookiesTreeModel* model);
+ virtual ~CookieTreeRootNode();
CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url);
// CookieTreeNode methods:
- virtual CookiesTreeModel* GetModel() const { return model_; }
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(string16(),
- DetailedInfo::TYPE_ROOT,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
- private:
+ virtual CookiesTreeModel* GetModel() const;
+ virtual DetailedInfo GetDetailedInfo() const;
+ private:
CookiesTreeModel* model_;
DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode);
@@ -236,15 +232,11 @@ class CookieTreeCookieNode : public CookieTreeNode {
// Does not take ownership of cookie, and cookie should remain valid at least
// as long as the CookieTreeCookieNode is valid.
explicit CookieTreeCookieNode(net::CookieMonster::CanonicalCookie* cookie);
- virtual ~CookieTreeCookieNode() {}
+ virtual ~CookieTreeCookieNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_COOKIE,
- cookie_, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// Cookie_ is not owned by the node, and is expected to remain valid as long
@@ -257,13 +249,9 @@ class CookieTreeCookieNode : public CookieTreeNode {
class CookieTreeCookiesNode : public CookieTreeNode {
public:
CookieTreeCookiesNode();
- virtual ~CookieTreeCookiesNode() {}
+ virtual ~CookieTreeCookiesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_COOKIES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddCookieNode(CookieTreeCookieNode* child) {
AddChildSortedByTitle(child);
@@ -285,11 +273,7 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
virtual ~CookieTreeAppCacheNode() {}
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_APPCACHE,
- NULL, NULL, NULL, NULL, appcache_info_, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
const appcache::AppCacheInfo* appcache_info_;
@@ -299,13 +283,9 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
class CookieTreeAppCachesNode : public CookieTreeNode {
public:
CookieTreeAppCachesNode();
- virtual ~CookieTreeAppCachesNode() {}
+ virtual ~CookieTreeAppCachesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_APPCACHES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddAppCacheNode(CookieTreeAppCacheNode* child) {
AddChildSortedByTitle(child);
@@ -324,14 +304,10 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
// valid at least as long as the CookieTreeDatabaseNode is valid.
explicit CookieTreeDatabaseNode(
BrowsingDataDatabaseHelper::DatabaseInfo* database_info);
- virtual ~CookieTreeDatabaseNode() {}
+ virtual ~CookieTreeDatabaseNode();
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_DATABASE,
- NULL, database_info_, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// database_info_ is not owned by the node, and is expected to remain
@@ -344,13 +320,9 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
class CookieTreeDatabasesNode : public CookieTreeNode {
public:
CookieTreeDatabasesNode();
- virtual ~CookieTreeDatabasesNode() {}
+ virtual ~CookieTreeDatabasesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_DATABASES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddDatabaseNode(CookieTreeDatabaseNode* child) {
AddChildSortedByTitle(child);
@@ -369,15 +341,11 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
// valid.
explicit CookieTreeLocalStorageNode(
BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info);
- virtual ~CookieTreeLocalStorageNode() {}
+ virtual ~CookieTreeLocalStorageNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_LOCAL_STORAGE,
- NULL, NULL, local_storage_info_, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// local_storage_info_ is not owned by the node, and is expected to remain
@@ -390,13 +358,9 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
class CookieTreeLocalStoragesNode : public CookieTreeNode {
public:
CookieTreeLocalStoragesNode();
- virtual ~CookieTreeLocalStoragesNode() {}
+ virtual ~CookieTreeLocalStoragesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_LOCAL_STORAGES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddLocalStorageNode(CookieTreeLocalStorageNode* child) {
AddChildSortedByTitle(child);
@@ -416,14 +380,10 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
// is valid.
explicit CookieTreeSessionStorageNode(
BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info);
- virtual ~CookieTreeSessionStorageNode() {}
+ virtual ~CookieTreeSessionStorageNode();
// CookieTreeNode methods:
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_SESSION_STORAGE,
- NULL, NULL, NULL, session_storage_info_, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// session_storage_info_ is not owned by the node, and is expected to remain
@@ -436,13 +396,9 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
class CookieTreeSessionStoragesNode : public CookieTreeNode {
public:
CookieTreeSessionStoragesNode();
- virtual ~CookieTreeSessionStoragesNode() {}
+ virtual ~CookieTreeSessionStoragesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_SESSION_STORAGES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddSessionStorageNode(CookieTreeSessionStorageNode* child) {
AddChildSortedByTitle(child);
@@ -461,15 +417,11 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
// is valid.
explicit CookieTreeIndexedDBNode(
BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info);
- virtual ~CookieTreeIndexedDBNode() {}
+ virtual ~CookieTreeIndexedDBNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_INDEXED_DB,
- NULL, NULL, NULL, NULL, NULL, indexed_db_info_);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// indexed_db_info_ is not owned by the node, and is expected to remain
@@ -482,13 +434,9 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
class CookieTreeIndexedDBsNode : public CookieTreeNode {
public:
CookieTreeIndexedDBsNode();
- virtual ~CookieTreeIndexedDBsNode() {}
+ virtual ~CookieTreeIndexedDBsNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_INDEXED_DBS,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddIndexedDBNode(CookieTreeIndexedDBNode* child) {
AddChildSortedByTitle(child);
diff --git a/chrome/browser/debugger/devtools_client_host.cc b/chrome/browser/debugger/devtools_client_host.cc
new file mode 100644
index 0000000..f619bfb
--- /dev/null
+++ b/chrome/browser/debugger/devtools_client_host.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/debugger/devtools_client_host.h"
+
+DevToolsWindow* DevToolsClientHost::AsDevToolsWindow() {
+ return NULL;
+}
+
+void DevToolsClientHost::NotifyCloseListener() {
+ if (close_listener_) {
+ close_listener_->ClientHostClosing(this);
+ close_listener_ = NULL;
+ }
+}
diff --git a/chrome/browser/debugger/devtools_client_host.h b/chrome/browser/debugger/devtools_client_host.h
index e62237d..952f532 100644
--- a/chrome/browser/debugger/devtools_client_host.h
+++ b/chrome/browser/debugger/devtools_client_host.h
@@ -41,19 +41,14 @@ class DevToolsClientHost {
close_listener_ = listener;
}
- virtual DevToolsWindow* AsDevToolsWindow() { return NULL; }
+ virtual DevToolsWindow* AsDevToolsWindow();
protected:
DevToolsClientHost() : close_listener_(NULL) {}
// Should be called when the devtools client is going to die and this
// DevToolsClientHost should not be used anymore.
- void NotifyCloseListener() {
- if (close_listener_) {
- close_listener_->ClientHostClosing(this);
- close_listener_ = NULL;
- }
- }
+ void NotifyCloseListener();
private:
CloseListener* close_listener_;
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket.cc b/chrome/browser/debugger/devtools_remote_listen_socket.cc
index 8ea1821..3ac15ae 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket.cc
+++ b/chrome/browser/debugger/devtools_remote_listen_socket.cc
@@ -206,6 +206,10 @@ void DevToolsRemoteListenSocket::HandleMessage() {
}
}
+void DevToolsRemoteListenSocket::Listen() {
+ ListenSocket::Listen();
+}
+
void DevToolsRemoteListenSocket::Accept() {
SOCKET conn = ListenSocket::Accept(socket_);
if (conn != INVALID_SOCKET) {
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket.h b/chrome/browser/debugger/devtools_remote_listen_socket.h
index 5497861..28c3f1f 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket.h
+++ b/chrome/browser/debugger/devtools_remote_listen_socket.h
@@ -26,7 +26,7 @@ class DevToolsRemoteListenSocket : public ListenSocket,
DevToolsRemoteListener* message_listener);
protected:
- virtual void Listen() { ListenSocket::Listen(); }
+ virtual void Listen();
virtual void Accept();
virtual void Close();
virtual void SendInternal(const char* bytes, int len);
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 51aa1e6..bef546d 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -392,6 +392,10 @@ void DevToolsWindow::UpdateTheme() {
ExecuteJavascriptInWebFrame(L"", UTF8ToWide(command));
}
+bool DevToolsWindow::CanReloadContents(TabContents* source) const {
+ return false;
+}
+
bool DevToolsWindow::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
if (docked_) {
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index a9ba40d..71c8871 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -88,7 +88,7 @@ class DevToolsWindow
virtual void LoadingStateChanged(TabContents* source) {}
virtual void CloseContents(TabContents* source) {}
virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
- virtual bool CanReloadContents(TabContents* source) const { return false; }
+ virtual bool CanReloadContents(TabContents* source) const;
virtual void URLStarredChanged(TabContents* source, bool starred) {}
virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {}
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index a90fcfc..a96beb6 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -107,6 +107,10 @@ void HistoryUIHTMLSource::StartDataRequest(const std::string& path,
SendResponse(request_id, html_bytes);
}
+std::string HistoryUIHTMLSource::GetMimeType(const std::string&) const {
+ return "text/html";
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// HistoryHandler
diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h
index 8d33afe..f31a9d8 100644
--- a/chrome/browser/dom_ui/history_ui.h
+++ b/chrome/browser/dom_ui/history_ui.h
@@ -26,9 +26,7 @@ class HistoryUIHTMLSource : public ChromeURLDataManager::DataSource {
virtual void StartDataRequest(const std::string& path,
bool is_off_the_record,
int request_id);
- virtual std::string GetMimeType(const std::string&) const {
- return "text/html";
- }
+ virtual std::string GetMimeType(const std::string&) const;
private:
~HistoryUIHTMLSource() {}
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index 8d11e9a..404bb2b 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -27,6 +27,10 @@ DownloadShelfContextMenu::DownloadShelfContextMenu(
DownloadShelfContextMenu::~DownloadShelfContextMenu() {
}
+DownloadItem* DownloadShelfContextMenu::download() const {
+ return download_;
+}
+
bool DownloadShelfContextMenu::IsCommandIdChecked(int command_id) const {
switch (command_id) {
case OPEN_WHEN_COMPLETE:
diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h
index b6ee780..b85123c 100644
--- a/chrome/browser/download/download_shelf.h
+++ b/chrome/browser/download/download_shelf.h
@@ -48,7 +48,7 @@ class DownloadShelfContextMenu : public menus::SimpleMenuModel::Delegate {
public:
virtual ~DownloadShelfContextMenu();
- virtual DownloadItem* download() const { return download_; }
+ virtual DownloadItem* download() const;
enum ContextMenuCommands {
SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected.
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 2d99c88..cb6bd6b 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -177,6 +177,10 @@ void ExtensionHost::CreateView(Browser* browser) {
#endif
}
+TabContents* ExtensionHost::associated_tab_contents() const {
+ return associated_tab_contents_;
+}
+
RenderProcessHost* ExtensionHost::render_process_host() const {
return render_view_host_->process();
}
@@ -444,6 +448,14 @@ gfx::NativeWindow ExtensionHost::GetMessageBoxRootWindow() {
return NULL;
}
+TabContents* ExtensionHost::AsTabContents() {
+ return NULL;
+}
+
+ExtensionHost* ExtensionHost::AsExtensionHost() {
+ return this;
+}
+
void ExtensionHost::OnMessageBoxClosed(IPC::Message* reply_msg,
bool success,
const std::wstring& prompt) {
@@ -742,6 +754,10 @@ ViewType::Type ExtensionHost::GetRenderViewType() const {
return extension_host_type_;
}
+const GURL& ExtensionHost::GetURL() const {
+ return url_;
+}
+
void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
if (view_.get())
view_->RenderViewCreated();
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index e447376..935b76c 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -83,9 +83,7 @@ class ExtensionHost : public RenderViewHostDelegate,
ViewType::Type extension_host_type() const { return extension_host_type_; }
// ExtensionFunctionDispatcher::Delegate
- virtual TabContents* associated_tab_contents() const {
- return associated_tab_contents_;
- }
+ virtual TabContents* associated_tab_contents() const;
void set_associated_tab_contents(TabContents* associated_tab_contents) {
associated_tab_contents_ = associated_tab_contents;
}
@@ -109,7 +107,7 @@ class ExtensionHost : public RenderViewHostDelegate,
void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit);
// RenderViewHostDelegate::View implementation.
- virtual const GURL& GetURL() const { return url_; }
+ virtual const GURL& GetURL() const;
virtual void RenderViewCreated(RenderViewHost* render_view_host);
virtual ViewType::Type GetRenderViewType() const;
virtual FileSelect* GetFileSelectDelegate();
@@ -192,8 +190,8 @@ class ExtensionHost : public RenderViewHostDelegate,
const std::wstring& prompt);
virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {}
virtual gfx::NativeWindow GetMessageBoxRootWindow();
- virtual TabContents* AsTabContents() { return NULL; }
- virtual ExtensionHost* AsExtensionHost() { return this; }
+ virtual TabContents* AsTabContents();
+ virtual ExtensionHost* AsExtensionHost();
protected:
// Internal functions used to support the CreateNewWidget() method. If a
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index e807637..88d97d2 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -597,6 +597,22 @@ ExtensionsService::ExtensionsService(Profile* profile,
0, kOmniboxIconPaddingRight));
}
+const ExtensionList* ExtensionsService::extensions() const {
+ return &extensions_;
+}
+
+const ExtensionList* ExtensionsService::disabled_extensions() const {
+ return &disabled_extensions_;
+}
+
+const PendingExtensionMap& ExtensionsService::pending_extensions() const {
+ return pending_extensions_;
+}
+
+bool ExtensionsService::HasInstalledExtensions() {
+ return !(extensions_.empty() && disabled_extensions_.empty());
+}
+
ExtensionsService::~ExtensionsService() {
DCHECK(!profile_); // Profile should have told us it's going away.
UnloadAllExtensions();
@@ -1356,6 +1372,10 @@ void ExtensionsService::DestroyingProfile() {
toolbar_model_.DestroyingProfile();
}
+ExtensionPrefs* ExtensionsService::extension_prefs() {
+ return extension_prefs_;
+}
+
void ExtensionsService::CheckAdminBlacklist() {
std::vector<std::string> to_be_removed;
// Loop through extensions list, unload installed extensions.
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 1db154f..68f7bce 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -158,15 +158,11 @@ class ExtensionsService
bool autoupdate_enabled);
// Gets the list of currently installed extensions.
- virtual const ExtensionList* extensions() const { return &extensions_; }
- virtual const ExtensionList* disabled_extensions() const {
- return &disabled_extensions_;
- }
+ virtual const ExtensionList* extensions() const;
+ virtual const ExtensionList* disabled_extensions() const;
// Gets the set of pending extensions.
- virtual const PendingExtensionMap& pending_extensions() const {
- return pending_extensions_;
- }
+ virtual const PendingExtensionMap& pending_extensions() const;
// Registers an extension to be loaded as a component extension.
void register_component_extension(const ComponentExtensionInfo& info) {
@@ -174,9 +170,7 @@ class ExtensionsService
}
// Returns true if any extensions are installed.
- virtual bool HasInstalledExtensions() {
- return !(extensions_.empty() && disabled_extensions_.empty());
- }
+ virtual bool HasInstalledExtensions();
const FilePath& install_directory() const { return install_directory_; }
@@ -404,7 +398,7 @@ class ExtensionsService
// it.
void DestroyingProfile();
- virtual ExtensionPrefs* extension_prefs() { return extension_prefs_; }
+ virtual ExtensionPrefs* extension_prefs();
// Whether the extension service is ready.
// TODO(skerner): Get rid of this method. crbug.com/63756
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
index e0a6e75..4414591 100644
--- a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
@@ -649,6 +649,20 @@ void BrowserActionsToolbarGtk::AnimationEnded(const Animation* animation) {
UpdateChevronVisibility();
}
+bool BrowserActionsToolbarGtk::IsCommandIdChecked(int command_id) const {
+ return false;
+}
+
+bool BrowserActionsToolbarGtk::IsCommandIdEnabled(int command_id) const {
+ return true;
+}
+
+bool BrowserActionsToolbarGtk::GetAcceleratorForCommandId(
+ int command_id,
+ menus::Accelerator* accelerator) {
+ return false;
+}
+
void BrowserActionsToolbarGtk::ExecuteCommand(int command_id) {
const Extension* extension = model_->GetExtensionByIndex(command_id);
ExtensionAction* browser_action = extension->browser_action();
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/gtk/browser_actions_toolbar_gtk.h
index 5d8b1c3..452a642 100644
--- a/chrome/browser/gtk/browser_actions_toolbar_gtk.h
+++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.h
@@ -117,13 +117,11 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
// SimpleMenuModel::Delegate implementation.
// In our case, |command_id| is be the index into the model's extension list.
- virtual bool IsCommandIdChecked(int command_id) const { return false; }
- virtual bool IsCommandIdEnabled(int command_id) const { return true; }
+ virtual bool IsCommandIdChecked(int command_id) const;
+ virtual bool IsCommandIdEnabled(int command_id) const;
virtual bool GetAcceleratorForCommandId(
int command_id,
- menus::Accelerator* accelerator) {
- return false;
- }
+ menus::Accelerator* accelerator);
virtual void ExecuteCommand(int command_id);
// MenuGtk::Delegate implementation.
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index ce10aa0..eef30ad 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -319,6 +319,10 @@ void PluginProcessHost::OnChannelError() {
CancelRequests();
}
+bool PluginProcessHost::CanShutdown() {
+ return sent_requests_.empty();
+}
+
void PluginProcessHost::CancelRequests() {
for (size_t i = 0; i < pending_requests_.size(); ++i)
pending_requests_[i]->OnError();
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index ac5b326..5bbcc45 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -144,7 +144,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
void OnPluginSetCursorVisibility(bool visible);
#endif
- virtual bool CanShutdown() { return sent_requests_.empty(); }
+ virtual bool CanShutdown();
void CancelRequests();
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index e319e36..095fa82 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -931,6 +931,10 @@ void RenderViewHost::Shutdown() {
RenderWidgetHost::Shutdown();
}
+bool RenderViewHost::IsRenderView() const {
+ return true;
+}
+
void RenderViewHost::CreateNewWindow(
int route_id,
WindowContainerType window_container_type,
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 96a6b15..b5399bf 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -436,7 +436,7 @@ class RenderViewHost : public RenderWidgetHost {
// RenderWidgetHost public overrides.
virtual void Shutdown();
- virtual bool IsRenderView() const { return true; }
+ virtual bool IsRenderView() const;
virtual void OnMessageReceived(const IPC::Message& msg);
virtual void GotFocus();
virtual void LostCapture();
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 342e887..3fa5610 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -118,6 +118,12 @@ gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {
return 0;
}
+bool RenderWidgetHost::PreHandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut) {
+ return false;
+}
+
void RenderWidgetHost::Init() {
DCHECK(process_->HasConnection());
@@ -139,6 +145,10 @@ void RenderWidgetHost::Shutdown() {
Destroy();
}
+bool RenderWidgetHost::IsRenderView() const {
+ return false;
+}
+
void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) {
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHost, msg, msg_is_ok)
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index 45b114b..b0192a4 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -177,7 +177,7 @@ class RenderWidgetHost : public IPC::Channel::Listener,
virtual void Shutdown();
// Manual RTTI FTW. We are not hosting a web page.
- virtual bool IsRenderView() const { return false; }
+ virtual bool IsRenderView() const;
// IPC::Channel::Listener
virtual void OnMessageReceived(const IPC::Message& msg);
@@ -428,9 +428,7 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
// |*is_keyboard_shortcut| should be set to true.
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) {
- return false;
- }
+ bool* is_keyboard_shortcut);
// Called when a keyboard event was not processed by the renderer. This is
// overridden by RenderView to send upwards to its delegate.
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index aae917a..7112433 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -67,3 +67,8 @@ void SidebarContainer::SetIcon(const SkBitmap& bitmap) {
void SidebarContainer::SetTitle(const string16& title) {
title_ = title;
}
+
+bool SidebarContainer::IsPopup(const TabContents* source) const {
+ return false;
+}
+
diff --git a/chrome/browser/sidebar/sidebar_container.h b/chrome/browser/sidebar/sidebar_container.h
index 0572f43..3f2d19d 100644
--- a/chrome/browser/sidebar/sidebar_container.h
+++ b/chrome/browser/sidebar/sidebar_container.h
@@ -105,7 +105,7 @@ class SidebarContainer
virtual void LoadingStateChanged(TabContents* source) {}
virtual void CloseContents(TabContents* source) {}
virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
- virtual bool IsPopup(const TabContents* source) const { return false; }
+ virtual bool IsPopup(const TabContents* source) const;
virtual void URLStarredChanged(TabContents* source, bool starred) {}
virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {}
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/chrome/browser/sync/engine/model_changing_syncer_command.cc
index b2131b4..cc2a8eb 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.cc
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.cc
@@ -29,4 +29,9 @@ void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
}
}
+bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
+ sessions::SyncSession* session) {
+ return true;
+}
+
} // namespace browser_sync
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.h b/chrome/browser/sync/engine/model_changing_syncer_command.h
index ae59272..f6d6a43 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.h
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.h
@@ -42,9 +42,7 @@ class ModelChangingSyncerCommand : public SyncerCommand {
// *without* a ModelSafeGroup restriction in place on the SyncSession.
// Returns true on success, false on failure.
// TODO(tim): Remove this (bug 36594).
- virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session) {
- return true;
- }
+ virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session);
// Abstract method to be implemented by subclasses to handle logic that
// operates on the model. This is invoked with a SyncSession ModelSafeGroup
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.cc b/chrome/browser/sync/engine/net/server_connection_manager.cc
index 41e79f4..20776fe 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.cc
+++ b/chrome/browser/sync/engine/net/server_connection_manager.cc
@@ -329,6 +329,10 @@ std::string ServerConnectionManager::GetServerHost() const {
return gurl.host();
}
+ServerConnectionManager::Post* ServerConnectionManager::MakePost() {
+ return NULL; // For testing.
+}
+
bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm,
syncable::DirectoryManager* manager,
const std::string& share) {
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.h b/chrome/browser/sync/engine/net/server_connection_manager.h
index 0363993..6380151 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.h
+++ b/chrome/browser/sync/engine/net/server_connection_manager.h
@@ -275,9 +275,7 @@ class ServerConnectionManager {
// Factory method to create a Post object we can use for communication with
// the server.
- virtual Post* MakePost() {
- return NULL; // For testing.
- };
+ virtual Post* MakePost();
void set_client_id(const std::string& client_id) {
DCHECK(client_id_.empty());
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index 12b3435..501577dd 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -364,6 +364,22 @@ void SyncerThread::ThreadMainLoop() {
#endif
}
+void SyncerThread::SetConnected(bool connected) {
+ DCHECK(!thread_.IsRunning());
+ vault_.connected_ = connected;
+}
+
+void SyncerThread::SetSyncerPollingInterval(base::TimeDelta interval) {
+ // TODO(timsteele): Use TimeDelta internally.
+ syncer_polling_interval_ = static_cast<int>(interval.InSeconds());
+}
+
+void SyncerThread::SetSyncerShortPollInterval(base::TimeDelta interval) {
+ // TODO(timsteele): Use TimeDelta internally.
+ syncer_short_poll_interval_seconds_ =
+ static_cast<int>(interval.InSeconds());
+}
+
void SyncerThread::WaitUntilConnectedOrQuit() {
VLOG(1) << "Syncer thread waiting for connection.";
Notify(SyncEngineEvent::SYNCER_THREAD_WAITING_FOR_CONNECTION);
@@ -428,6 +444,10 @@ void SyncerThread::ExitPausedState() {
Notify(SyncEngineEvent::SYNCER_THREAD_RESUMED);
}
+void SyncerThread::DisableIdleDetection() {
+ disable_idle_detection_ = true;
+}
+
// We check how long the user's been idle and sync less often if the machine is
// not in use. The aim is to reduce server load.
SyncerThread::WaitInterval SyncerThread::CalculatePollingWaitTime(
diff --git a/chrome/browser/sync/engine/syncer_thread.h b/chrome/browser/sync/engine/syncer_thread.h
index b079c55..6681225 100644
--- a/chrome/browser/sync/engine/syncer_thread.h
+++ b/chrome/browser/sync/engine/syncer_thread.h
@@ -151,20 +151,10 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
virtual void ThreadMain();
void ThreadMainLoop();
- virtual void SetConnected(bool connected) {
- DCHECK(!thread_.IsRunning());
- vault_.connected_ = connected;
- }
-
- virtual void SetSyncerPollingInterval(base::TimeDelta interval) {
- // TODO(timsteele): Use TimeDelta internally.
- syncer_polling_interval_ = static_cast<int>(interval.InSeconds());
- }
- virtual void SetSyncerShortPollInterval(base::TimeDelta interval) {
- // TODO(timsteele): Use TimeDelta internally.
- syncer_short_poll_interval_seconds_ =
- static_cast<int>(interval.InSeconds());
- }
+ virtual void SetConnected(bool connected);
+
+ virtual void SetSyncerPollingInterval(base::TimeDelta interval);
+ virtual void SetSyncerShortPollInterval(base::TimeDelta interval);
// Needed to emulate the behavior of pthread_create, which synchronously
// started the thread and set the value of thread_running_ to true.
@@ -305,7 +295,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
void ExitPausedState();
// For unit tests only.
- virtual void DisableIdleDetection() { disable_idle_detection_ = true; }
+ virtual void DisableIdleDetection();
// This sets all conditions for syncer thread termination but does not
// actually join threads. It is expected that Stop will be called at some
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 1efe37a..5ec89be 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -108,6 +108,12 @@ int64 SessionModelAssociator::GetSyncIdFromChromeId(const std::string& id) {
return node.GetId();
}
+bool SessionModelAssociator::InitSyncNodeFromChromeId(
+ const std::string& id,
+ sync_api::BaseNode* sync_node) {
+ return false;
+}
+
bool SessionModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
DCHECK(CalledOnValidThread());
CHECK(has_nodes);
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index b10d290..502af18 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -52,10 +52,8 @@ class SessionModelAssociator : public PerDataTypeAssociatorInterface<
explicit SessionModelAssociator(ProfileSyncService* sync_service);
virtual ~SessionModelAssociator();
-
// AssociatorInterface and PerDataTypeAssociator Interface implementation.
virtual void AbortAssociation() {
- return;
// No implementation needed, this associator runs on the main
// thread.
}
@@ -100,9 +98,7 @@ class SessionModelAssociator : public PerDataTypeAssociatorInterface<
// Returns false if no sync node was found for the given chrome node id or
// if the initialization of sync node fails.
virtual bool InitSyncNodeFromChromeId(const std::string& id,
- sync_api::BaseNode* sync_node) {
- return false;
- }
+ sync_api::BaseNode* sync_node);
// The has_nodes out parameter is set to true if the sync model has
// nodes other than the permanent tagged nodes. The method may
diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc
index 86dbf44..24622ae 100644
--- a/chrome/browser/sync/glue/ui_model_worker.cc
+++ b/chrome/browser/sync/glue/ui_model_worker.cc
@@ -89,6 +89,10 @@ void UIModelWorker::Stop() {
state_ = STOPPED;
}
+ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
+ return GROUP_UI;
+}
+
bool UIModelWorker::CurrentThreadIsWorkThread() {
return MessageLoop::current() == ui_loop_;
}
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index 66a2a995..f3a988b 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -67,7 +67,7 @@ class UIModelWorker : public browser_sync::ModelSafeWorker {
// ModelSafeWorker implementation. Called on syncapi SyncerThread.
virtual void DoWorkAndWaitUntilDone(Callback0::Type* work);
- virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_UI; }
+ virtual ModelSafeGroup GetModelSafeGroup();
virtual bool CurrentThreadIsWorkThread();
// Upon receiving this idempotent call, the ModelSafeWorker can
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 272dbe2..fb2473f 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -770,6 +770,10 @@ std::string ProfileSyncService::BuildSyncStatusSummaryText(
}
}
+bool ProfileSyncService::unrecoverable_error_detected() const {
+ return unrecoverable_error_detected_;
+}
+
string16 ProfileSyncService::GetLastSyncedTimeString() const {
if (last_synced_time_.is_null())
return l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER);
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index c4d8efd..19583b6 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -233,9 +233,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// TODO(timsteele): What happens if the bookmark model is loaded, a change
// takes place, and the backend isn't initialized yet?
bool sync_initialized() const { return backend_initialized_; }
- virtual bool unrecoverable_error_detected() const {
- return unrecoverable_error_detected_;
- }
+ virtual bool unrecoverable_error_detected() const;
const std::string& unrecoverable_error_message() {
return unrecoverable_error_message_;
}
diff --git a/chrome/browser/tab_closeable_state_watcher.cc b/chrome/browser/tab_closeable_state_watcher.cc
index 198dee5..28c9135 100644
--- a/chrome/browser/tab_closeable_state_watcher.cc
+++ b/chrome/browser/tab_closeable_state_watcher.cc
@@ -27,3 +27,11 @@
watcher = new ::TabCloseableStateWatcher();
return watcher;
}
+
+bool TabCloseableStateWatcher::CanCloseTab(const Browser* browser) const {
+ return true;
+}
+
+bool TabCloseableStateWatcher::CanCloseBrowser(Browser* browser) {
+ return true;
+}
diff --git a/chrome/browser/tab_closeable_state_watcher.h b/chrome/browser/tab_closeable_state_watcher.h
index 8ee81c3..b77a539 100644
--- a/chrome/browser/tab_closeable_state_watcher.h
+++ b/chrome/browser/tab_closeable_state_watcher.h
@@ -32,15 +32,11 @@ class TabCloseableStateWatcher {
// - setting up tab's context menu to determine if "Close tab" should
// should be enabled
// - determining if accelerator keys to close tab should be processed
- virtual bool CanCloseTab(const Browser* browser) const {
- return true;
- }
+ virtual bool CanCloseTab(const Browser* browser) const;
// Called from Browser::IsClosingPermitted which is in turn called from
// Browser::ShouldCloseWindow to check if |browser| can be closed.
- virtual bool CanCloseBrowser(Browser* browser) {
- return true;
- }
+ virtual bool CanCloseBrowser(Browser* browser);
// Called from Browser::CancelWindowClose when closing of window is canceled.
// Watcher is potentially interested in this, especially when the closing of
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 5067805..96ed7af 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -58,6 +58,18 @@ BackgroundContents::~BackgroundContents() {
render_view_host_->Shutdown(); // deletes render_view_host
}
+BackgroundContents* BackgroundContents::GetAsBackgroundContents() {
+ return this;
+}
+
+RenderViewHostDelegate::View* BackgroundContents::GetViewDelegate() {
+ return this;
+}
+
+const GURL& BackgroundContents::GetURL() const {
+ return url_;
+}
+
ViewType::Type BackgroundContents::GetRenderViewType() const {
return ViewType::BACKGROUND_CONTENTS;
}
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index 24dadef..3e2f307 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -58,9 +58,9 @@ class BackgroundContents : public RenderViewHostDelegate,
RenderViewHost* render_view_host() { return render_view_host_; }
// RenderViewHostDelegate implementation.
- virtual BackgroundContents* GetAsBackgroundContents() { return this; }
- virtual RenderViewHostDelegate::View* GetViewDelegate() { return this; }
- virtual const GURL& GetURL() const { return url_; }
+ virtual BackgroundContents* GetAsBackgroundContents();
+ virtual RenderViewHostDelegate::View* GetViewDelegate();
+ virtual const GURL& GetURL() const;
virtual ViewType::Type GetRenderViewType() const;
virtual int GetBrowserWindowID() const;
virtual void DidNavigate(RenderViewHost* render_view_host,
diff --git a/chrome/browser/tab_contents/infobar_delegate.cc b/chrome/browser/tab_contents/infobar_delegate.cc
index aae8553..671d17b 100644
--- a/chrome/browser/tab_contents/infobar_delegate.cc
+++ b/chrome/browser/tab_contents/infobar_delegate.cc
@@ -14,6 +14,10 @@
// InfoBarDelegate: ------------------------------------------------------------
+bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
+ return false;
+}
+
bool InfoBarDelegate::ShouldExpire(
const NavigationController::LoadCommittedDetails& details) const {
bool is_reload =
@@ -22,6 +26,44 @@ bool InfoBarDelegate::ShouldExpire(
return is_reload || (contents_unique_id_ != details.entry->unique_id());
}
+SkBitmap* InfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
+AlertInfoBarDelegate* InfoBarDelegate::AsAlertInfoBarDelegate() {
+ return NULL;
+}
+
+LinkInfoBarDelegate* InfoBarDelegate::AsLinkInfoBarDelegate() {
+ return NULL;
+}
+
+ConfirmInfoBarDelegate* InfoBarDelegate::AsConfirmInfoBarDelegate() {
+ return NULL;
+}
+
+ThemeInstalledInfoBarDelegate*
+InfoBarDelegate::AsThemePreviewInfobarDelegate() {
+ return NULL;
+}
+
+TranslateInfoBarDelegate* InfoBarDelegate::AsTranslateInfoBarDelegate() {
+ return NULL;
+}
+
+ExtensionInfoBarDelegate* InfoBarDelegate::AsExtensionInfoBarDelegate() {
+ return NULL;
+}
+
+CrashedExtensionInfoBarDelegate*
+InfoBarDelegate::AsCrashedExtensionInfoBarDelegate() {
+ return NULL;
+}
+
+InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() {
+ return WARNING_TYPE;
+}
+
InfoBarDelegate::InfoBarDelegate(TabContents* contents)
: contents_unique_id_(0) {
if (contents)
@@ -35,6 +77,10 @@ void InfoBarDelegate::StoreActiveEntryUniqueID(TabContents* contents) {
// AlertInfoBarDelegate: -------------------------------------------------------
+SkBitmap* AlertInfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
bool AlertInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
AlertInfoBarDelegate* alert_delegate = delegate->AsAlertInfoBarDelegate();
if (!alert_delegate)
@@ -43,18 +89,44 @@ bool AlertInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
return alert_delegate->GetMessageText() == GetMessageText();
}
+AlertInfoBarDelegate* AlertInfoBarDelegate::AsAlertInfoBarDelegate() {
+ return this;
+}
+
AlertInfoBarDelegate::AlertInfoBarDelegate(TabContents* contents)
: InfoBarDelegate(contents) {
}
// LinkInfoBarDelegate: --------------------------------------------------------
+string16 LinkInfoBarDelegate::GetMessageTextWithOffset(
+ size_t* link_offset) const {
+ *link_offset = string16::npos;
+ return string16();
+}
+
+SkBitmap* LinkInfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
+bool LinkInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+LinkInfoBarDelegate* LinkInfoBarDelegate::AsLinkInfoBarDelegate() {
+ return this;
+}
+
LinkInfoBarDelegate::LinkInfoBarDelegate(TabContents* contents)
: InfoBarDelegate(contents) {
}
// ConfirmInfoBarDelegate: -----------------------------------------------------
+int ConfirmInfoBarDelegate::GetButtons() const {
+ return BUTTON_NONE;
+}
+
string16 ConfirmInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
if (button == BUTTON_OK)
@@ -65,6 +137,30 @@ string16 ConfirmInfoBarDelegate::GetButtonLabel(
return string16();
}
+bool ConfirmInfoBarDelegate::NeedElevation(InfoBarButton button) const {
+ return false;
+}
+
+bool ConfirmInfoBarDelegate::Accept() {
+ return true;
+}
+
+bool ConfirmInfoBarDelegate::Cancel() {
+ return true;
+}
+
+string16 ConfirmInfoBarDelegate::GetLinkText() {
+ return string16();
+}
+
+bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
+ return this;
+}
+
ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(TabContents* contents)
: AlertInfoBarDelegate(contents) {
}
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index 4da3510..af9b9c9 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -58,9 +58,7 @@ class InfoBarDelegate {
// because a matching one already exists. If this function returns true, the
// TabContents will not add the new delegate because it considers one to
// already be present.
- virtual bool EqualsDelegate(InfoBarDelegate* delegate) const {
- return false;
- }
+ virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
// Returns true if the InfoBar should be closed automatically after the page
// is navigated. The default behavior is to return true if the page is
@@ -81,52 +79,36 @@ class InfoBarDelegate {
// Return the icon to be shown for this InfoBar. If the returned bitmap is
// NULL, no icon is shown.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Returns a pointer to the AlertInfoBarDelegate interface, if implemented.
- virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate() {
- return NULL;
- }
+ virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate();
// Returns a pointer to the LinkInfoBarDelegate interface, if implemented.
- virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() {
- return NULL;
- }
+ virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate();
// Returns a pointer to the ConfirmInfoBarDelegate interface, if implemented.
- virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() {
- return NULL;
- }
+ virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
// Returns a pointer to the ThemeInstalledInfoBarDelegate interface, if
// implemented.
- virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() {
- return NULL;
- }
+ virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
// Returns a pointer to the TranslateInfoBarDelegate interface, if
// implemented.
- virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() {
- return NULL;
- }
+ virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
// Returns a pointer to the ExtensionInfoBarDelegate interface, if
// implemented.
- virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() {
- return NULL;
- }
+ virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate();
// Returns a pointer to the CrashedExtensionInfoBarDelegate interface, if
// implemented.
- virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() {
- return NULL;
- }
+ virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate();
// Returns the type of the infobar. The type determines the appearance (such
// as background color) of the infobar.
- virtual Type GetInfoBarType() {
- return WARNING_TYPE;
- }
+ virtual Type GetInfoBarType();
protected:
// Provided to subclasses as a convenience to initialize the state of this
@@ -157,12 +139,12 @@ class AlertInfoBarDelegate : public InfoBarDelegate {
virtual string16 GetMessageText() const = 0;
// Overridden from InfoBarDelegate.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Overridden from InfoBarDelegate:
virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
virtual InfoBar* CreateInfoBar();
- virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate() { return this; }
+ virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate();
protected:
explicit AlertInfoBarDelegate(TabContents* contents);
@@ -178,31 +160,24 @@ class LinkInfoBarDelegate : public InfoBarDelegate {
// is the position where the link should be inserted. If |link_offset| is set
// to string16::npos (it is by default), the link is right aligned within
// the InfoBar rather than being embedded in the message text.
- virtual string16 GetMessageTextWithOffset(size_t* link_offset) const {
- *link_offset = string16::npos;
- return string16();
- }
+ virtual string16 GetMessageTextWithOffset(size_t* link_offset) const;
// Returns the text of the link to be displayed.
virtual string16 GetLinkText() const = 0;
// Overridden from InfoBarDelegate.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Called when the Link is clicked. The |disposition| specifies how the
// resulting document should be loaded (based on the event flags present when
// the link was clicked). This function returns true if the InfoBar should be
// closed now or false if it should remain until the user explicitly closes
// it.
- virtual bool LinkClicked(WindowOpenDisposition disposition) {
- return true;
- }
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
// Overridden from InfoBarDelegate:
virtual InfoBar* CreateInfoBar();
- virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() {
- return this;
- }
+ virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate();
protected:
explicit LinkInfoBarDelegate(TabContents* contents);
@@ -223,30 +198,26 @@ class ConfirmInfoBarDelegate : public AlertInfoBarDelegate {
};
// Return the buttons to be shown for this InfoBar.
- virtual int GetButtons() const {
- return BUTTON_NONE;
- }
+ virtual int GetButtons() const;
// Return the label for the specified button. The default implementation
// returns "OK" for the OK button and "Cancel" for the Cancel button.
virtual string16 GetButtonLabel(InfoBarButton button) const;
// Return whether or not the specified button needs elevation.
- virtual bool NeedElevation(InfoBarButton button) const { return false; }
+ virtual bool NeedElevation(InfoBarButton button) const;
// Called when the OK button is pressed. If the function returns true, the
// InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Accept() { return true; }
+ virtual bool Accept();
// Called when the Cancel button is pressed. If the function returns true,
// the InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Cancel() { return true; }
+ virtual bool Cancel();
// Returns the text of the link to be displayed, if any. Otherwise returns
// and empty string.
- virtual string16 GetLinkText() {
- return string16();
- }
+ virtual string16 GetLinkText();
// Called when the Link is clicked. The |disposition| specifies how the
// resulting document should be loaded (based on the event flags present when
@@ -254,15 +225,11 @@ class ConfirmInfoBarDelegate : public AlertInfoBarDelegate {
// closed now or false if it should remain until the user explicitly closes
// it.
// Will only be called if GetLinkText() returns non-empty string.
- virtual bool LinkClicked(WindowOpenDisposition disposition) {
- return true;
- }
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
// Overridden from InfoBarDelegate:
virtual InfoBar* CreateInfoBar();
- virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() {
- return this;
- }
+ virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
protected:
explicit ConfirmInfoBarDelegate(TabContents* contents);
diff --git a/chrome/browser/themes/browser_theme_provider.cc b/chrome/browser/themes/browser_theme_provider.cc
index 3b33f04..36763bb 100644
--- a/chrome/browser/themes/browser_theme_provider.cc
+++ b/chrome/browser/themes/browser_theme_provider.cc
@@ -326,6 +326,10 @@ void BrowserThemeProvider::UseDefaultTheme() {
UserMetrics::RecordAction(UserMetricsAction("Themes_Reset"), profile_);
}
+void BrowserThemeProvider::SetNativeTheme() {
+ UseDefaultTheme();
+}
+
bool BrowserThemeProvider::UsingDefaultTheme() {
return GetThemeID() == BrowserThemeProvider::kDefaultThemeID;
}
diff --git a/chrome/browser/themes/browser_theme_provider.h b/chrome/browser/themes/browser_theme_provider.h
index 2322b8b..cddd153 100644
--- a/chrome/browser/themes/browser_theme_provider.h
+++ b/chrome/browser/themes/browser_theme_provider.h
@@ -159,7 +159,7 @@ class BrowserThemeProvider : public NonThreadSafe,
// Set the current theme to the native theme. On some platforms, the native
// theme is the default theme.
- virtual void SetNativeTheme() { UseDefaultTheme(); }
+ virtual void SetNativeTheme();
// Whether we're using the chrome default theme. Virtual so linux can check
// if we're using the GTK theme.
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
index 746140c..40e9189 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -38,6 +38,10 @@ void AppModalDialog::CreateAndShowDialog() {
native_dialog_->ShowAppModalDialog();
}
+bool AppModalDialog::IsValid() {
+ return !skip_this_dialog_;
+}
+
void AppModalDialog::ActivateModalDialog() {
DCHECK(native_dialog_);
native_dialog_->ActivateAppModalDialog();
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
index eb64790..ddc1808 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
@@ -56,7 +56,7 @@ class AppModalDialog {
// added to the AppModalDialogQueue. When the current modal dialog finishes
// and it's time to show the next dialog in the queue IsValid is invoked.
// If IsValid returns false the dialog is deleted and not shown.
- virtual bool IsValid() { return !skip_this_dialog_; }
+ virtual bool IsValid();
protected:
// Overridden by subclasses to create the feature-specific native dialog box.
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 22495f8..1756d3e 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -165,6 +165,16 @@ void UtilityProcessHost::OnProcessCrashed() {
NewRunnableMethod(client_.get(), &Client::OnProcessCrashed));
}
+bool UtilityProcessHost::CanShutdown() {
+ return true;
+}
+
+URLRequestContext* UtilityProcessHost::GetRequestContext(
+ uint32 request_id,
+ const ViewHostMsg_Resource_Request& request_data) {
+ return NULL;
+}
+
void UtilityProcessHost::Client::OnMessageReceived(
const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(UtilityProcessHost, message)
diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h
index 555ef44..559f39e 100644
--- a/chrome/browser/utility_process_host.h
+++ b/chrome/browser/utility_process_host.h
@@ -154,12 +154,10 @@ class UtilityProcessHost : public BrowserChildProcessHost {
// BrowserChildProcessHost:
virtual void OnProcessCrashed();
- virtual bool CanShutdown() { return true; }
+ virtual bool CanShutdown();
virtual URLRequestContext* GetRequestContext(
uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data) {
- return NULL;
- }
+ const ViewHostMsg_Resource_Request& request_data);
// A pointer to our client interface, who will be informed of progress.
scoped_refptr<Client> client_;