summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 01:22:15 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 01:22:15 +0000
commit810a52ef77564f1674a600317175743176bcc965 (patch)
treee18a35b4ef980bdb8eaad3c5812228a6e1b3ba16 /chrome
parent673ccc1d607a6d7d280d89fedd3fb3bc906a7e27 (diff)
downloadchromium_src-810a52ef77564f1674a600317175743176bcc965.zip
chromium_src-810a52ef77564f1674a600317175743176bcc965.tar.gz
chromium_src-810a52ef77564f1674a600317175743176bcc965.tar.bz2
Remove most uses of EmptyString(), EmptyWString(), EmptyString16(), and EmptyGURL(), since the code in question can just use the default constructor.
BUG=none TEST=none Review URL: http://codereview.chromium.org/517054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autofill/address.cc2
-rw-r--r--chrome/browser/autofill/contact_info.cc8
-rw-r--r--chrome/browser/autofill/credit_card.cc12
-rw-r--r--chrome/browser/autofill/form_group.h2
-rw-r--r--chrome/browser/browser.cc6
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc4
-rw-r--r--chrome/browser/history/history.h6
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc8
-rw-r--r--chrome/browser/plugin_process_host.cc4
-rw-r--r--chrome/browser/renderer_host/safe_browsing_resource_handler.cc4
-rw-r--r--chrome/browser/renderer_host/test/site_instance_unittest.cc8
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.cc6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc6
-rw-r--r--chrome/browser/shell_integration_win.cc6
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc7
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc6
-rw-r--r--chrome/browser/toolbar_model.cc11
-rw-r--r--chrome/browser/views/bug_report_view.cc4
-rw-r--r--chrome/browser/views/options/cookies_view.cc4
-rw-r--r--chrome/browser/views/options/general_page_view.cc10
-rw-r--r--chrome/browser/webdata/web_data_service_unittest.cc9
-rw-r--r--chrome/common/platform_util_mac.mm4
-rw-r--r--chrome/common/platform_util_win.cc4
-rw-r--r--chrome/renderer/render_view.cc12
24 files changed, 74 insertions, 79 deletions
diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc
index fb06cf8..f39f141 100644
--- a/chrome/browser/autofill/address.cc
+++ b/chrome/browser/autofill/address.cc
@@ -89,7 +89,7 @@ string16 Address::GetFieldText(const AutoFillType& type) const {
if (field_type == GetCountryType())
return country();
- return EmptyString16();
+ return string16();
}
void Address::SetInfo(const AutoFillType& type, const string16& value) {
diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc
index 9e31b18..266ea8e 100644
--- a/chrome/browser/autofill/contact_info.cc
+++ b/chrome/browser/autofill/contact_info.cc
@@ -84,7 +84,7 @@ string16 ContactInfo::GetFieldText(const AutoFillType& type) const {
return last();
if (field_type == NAME_MIDDLE_INITIAL)
- MiddleInitial();
+ return MiddleInitial();
if (field_type == NAME_FULL)
return FullName();
@@ -98,7 +98,7 @@ string16 ContactInfo::GetFieldText(const AutoFillType& type) const {
if (field_type == COMPANY_NAME)
return company_name();
- return EmptyString16();
+ return string16();
}
void ContactInfo::SetInfo(const AutoFillType& type, const string16& value) {
@@ -122,7 +122,7 @@ void ContactInfo::SetInfo(const AutoFillType& type, const string16& value) {
string16 ContactInfo::FullName() const {
if (first_.empty())
- return EmptyString16();
+ return string16();
std::vector<string16> full_name;
full_name.push_back(first_);
@@ -141,7 +141,7 @@ string16 ContactInfo::FullName() const {
string16 ContactInfo::MiddleInitial() const {
if (middle_.empty())
- return EmptyString16();
+ return string16();
string16 middle_name(middle());
string16 initial;
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index 97264de..00d183d 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -113,7 +113,7 @@ string16 CreditCard::GetFieldText(const AutoFillType& type) const {
string16 year = Expiration2DigitYearAsString();
if (!month.empty() && !year.empty())
return month + ASCIIToUTF16("/") + year;
- return EmptyString16();
+ return string16();
}
case CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR: {
@@ -121,7 +121,7 @@ string16 CreditCard::GetFieldText(const AutoFillType& type) const {
string16 year = Expiration4DigitYearAsString();
if (!month.empty() && !year.empty())
return month + ASCIIToUTF16("/") + year;
- return EmptyString16();
+ return string16();
}
case CREDIT_CARD_TYPE:
@@ -135,7 +135,7 @@ string16 CreditCard::GetFieldText(const AutoFillType& type) const {
default:
// ComputeDataPresentForArray will hit this repeatedly.
- return EmptyString16();
+ return string16();
}
}
@@ -186,7 +186,7 @@ void CreditCard::SetInfo(const AutoFillType& type, const string16& value) {
string16 CreditCard::ExpirationMonthAsString() const {
if (expiration_month_ == 0)
- return EmptyString16();
+ return string16();
string16 month = IntToString16(expiration_month_);
if (expiration_month_ >= 10)
@@ -199,14 +199,14 @@ string16 CreditCard::ExpirationMonthAsString() const {
string16 CreditCard::Expiration4DigitYearAsString() const {
if (expiration_year_ == 0)
- return EmptyString16();
+ return string16();
return IntToString16(Expiration4DigitYear());
}
string16 CreditCard::Expiration2DigitYearAsString() const {
if (expiration_year_ == 0)
- return EmptyString16();
+ return string16();
return IntToString16(Expiration2DigitYear());
}
diff --git a/chrome/browser/autofill/form_group.h b/chrome/browser/autofill/form_group.h
index 042ae0d..d48402f 100644
--- a/chrome/browser/autofill/form_group.h
+++ b/chrome/browser/autofill/form_group.h
@@ -49,7 +49,7 @@ class FormGroup {
// Returns the label for this FormGroup item. This should be overridden for
// form group items that implement a label.
- virtual string16 Label() const { return EmptyString16(); }
+ virtual string16 Label() const { return string16(); }
};
#endif // CHROME_BROWSER_AUTOFILL_FORM_GROUP_H_
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 79c2308..ce931cc 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -512,7 +512,7 @@ void Browser::FormatTitleForDisplay(string16* title) {
size_t match_index;
while ((match_index = title->find(L'\n', current_index)) !=
std::wstring::npos) {
- title->replace(match_index, 1, EmptyString16());
+ title->replace(match_index, 1, string16());
current_index = match_index;
}
}
@@ -2644,7 +2644,7 @@ void Browser::UpdateCommandsForTabState() {
// page) from the NavigationEntry because its reflects their origin rather
// than the display one (returned by GetURL) which may be different (like
// having "view-source:" on the front).
- GURL savable_url = (active_entry) ? active_entry->url() : GURL::EmptyGURL();
+ GURL savable_url = (active_entry) ? active_entry->url() : GURL();
command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE,
SavePackage::IsSavableURL(savable_url));
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index ffe99ae..0b5fa53 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1957,7 +1957,7 @@ void TabStripGtk::OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip) {
// a search query if necessary.
AutocompleteController controller(tabstrip->model_->profile());
controller.Start(UTF8ToWide(selection_text),
- EmptyWString(), // desired_tld
+ std::wstring(), // desired_tld
true, // prevent_inline_autocomplete
false, // prefer_keyword
true); // synchronous_only
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 09dc19e..33bdced 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -190,8 +190,8 @@ class HistoryService : public CancelableRequestProvider,
// For adding pages to history where no tracking information can be done.
void AddPage(const GURL& url) {
- AddPage(url, NULL, 0, GURL::EmptyGURL(), PageTransition::LINK,
- history::RedirectList(), false);
+ AddPage(url, NULL, 0, GURL(), PageTransition::LINK, history::RedirectList(),
+ false);
}
// Sets the title for the given page. The page should be in history. If it
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 8600de0..1239a55 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -47,14 +47,14 @@ static string16 CreateDataUrl(const GURL& icon_url, const string16& title,
if (template_html.empty()) {
NOTREACHED() << "unable to load template. ID: " << IDR_NOTIFICATION_HTML;
- return EmptyString16();
+ return string16();
}
std::vector<string16> subst;
if (icon_url.is_valid())
subst.push_back(UTF8ToUTF16(icon_url.spec()));
else
- subst.push_back(EmptyString16());
+ subst.push_back(string16());
subst.push_back(UTF8ToUTF16(EscapeForHTML(UTF16ToUTF8(title))));
subst.push_back(UTF8ToUTF16(EscapeForHTML(UTF16ToUTF8(body))));
@@ -62,7 +62,7 @@ static string16 CreateDataUrl(const GURL& icon_url, const string16& title,
if (icon_url.is_valid()) {
subst.push_back(ASCIIToUTF16("margin-left:56px;"));
} else {
- subst.push_back(EmptyString16());
+ subst.push_back(string16());
}
string16 format_string = ASCIIToUTF16("data:text/html;charset=utf-8,"
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 5ae3715..afc2486 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -549,7 +549,7 @@ void PluginProcessHost::OnGetCookies(uint32 request_context,
*cookies = context->cookie_store()->GetCookies(url);
} else {
DLOG(ERROR) << "Could not serve plugin cookies request.";
- *cookies = EmptyString();
+ cookies->clear();
}
}
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
index 64119a7..68301e8 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -96,7 +96,7 @@ void SafeBrowsingResourceHandler::OnGetHashTimeout() {
return;
safe_browsing_->CancelCheck(this);
- OnUrlCheckResult(GURL::EmptyGURL(), SafeBrowsingService::URL_SAFE);
+ OnUrlCheckResult(GURL(), SafeBrowsingService::URL_SAFE);
}
bool SafeBrowsingResourceHandler::OnWillRead(int request_id,
diff --git a/chrome/browser/renderer_host/test/site_instance_unittest.cc b/chrome/browser/renderer_host/test/site_instance_unittest.cc
index 2904a5e..7206476 100644
--- a/chrome/browser/renderer_host/test/site_instance_unittest.cc
+++ b/chrome/browser/renderer_host/test/site_instance_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -224,19 +224,19 @@ TEST_F(SiteInstanceTest, GetSiteForURL) {
// Javascript URLs have no site.
test_url = GURL("javascript:foo();");
- EXPECT_EQ(GURL::EmptyGURL(), SiteInstance::GetSiteForURL(test_url));
+ EXPECT_EQ(GURL(), SiteInstance::GetSiteForURL(test_url));
test_url = GURL("http://foo/a.html");
EXPECT_EQ(GURL("http://foo"), SiteInstance::GetSiteForURL(test_url));
test_url = GURL("file:///C:/Downloads/");
- EXPECT_EQ(GURL::EmptyGURL(), SiteInstance::GetSiteForURL(test_url));
+ EXPECT_EQ(GURL(), SiteInstance::GetSiteForURL(test_url));
// TODO(creis): Do we want to special case file URLs to ensure they have
// either no site or a special "file://" site? We currently return
// "file://home/" as the site, which seems broken.
// test_url = GURL("file://home/");
- // EXPECT_EQ(GURL::EmptyGURL(), SiteInstance::GetSiteForURL(test_url));
+ // EXPECT_EQ(GURL(), SiteInstance::GetSiteForURL(test_url));
}
// Test of distinguishing URLs from different sites. Most of this logic is
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.cc b/chrome/browser/renderer_host/test/test_render_view_host.cc
index e9e848f..720f51e 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.cc
+++ b/chrome/browser/renderer_host/test/test_render_view_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,11 +49,11 @@ void TestRenderViewHost::SendNavigate(int page_id, const GURL& url) {
params.page_id = page_id;
params.url = url;
- params.referrer = GURL::EmptyGURL();
+ params.referrer = GURL();
params.transition = PageTransition::LINK;
params.redirects = std::vector<GURL>();
params.should_update_history = true;
- params.searchable_form_url = GURL::EmptyGURL();
+ params.searchable_form_url = GURL();
params.searchable_form_encoding = std::string();
params.password_form = PasswordForm();
params.security_info = std::string();
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 988dd25..ea41f26 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,11 +22,11 @@ static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params,
const GURL& url) {
params->page_id = page_id;
params->url = url;
- params->referrer = GURL::EmptyGURL();
+ params->referrer = GURL();
params->transition = PageTransition::TYPED;
params->redirects = std::vector<GURL>();
params->should_update_history = false;
- params->searchable_form_url = GURL::EmptyGURL();
+ params->searchable_form_url = GURL();
params->searchable_form_encoding = std::string();
params->password_form = PasswordForm();
params->security_info = std::string();
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index b35ac18..7bdc011 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,7 +36,7 @@ namespace {
std::wstring GetProfileIdFromPath(const FilePath& profile_path) {
// Return empty string if profile_path is empty
if (profile_path.empty())
- return EmptyWString();
+ return std::wstring();
FilePath default_user_data_dir;
// Return empty string if profile_path is in default user data
@@ -44,7 +44,7 @@ std::wstring GetProfileIdFromPath(const FilePath& profile_path) {
if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir) &&
profile_path.DirName() == default_user_data_dir &&
profile_path.BaseName().value() == chrome::kNotSignedInProfile)
- return EmptyWString();
+ return std::wstring();
// Get joined basenames of user data dir and profile.
std::wstring basenames = profile_path.DirName().BaseName().value() +
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 950929f..fac4464 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -439,9 +439,8 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
// different (like having "view-source:" on the front).
NavigationEntry* active_entry =
source_tab_contents_->controller().GetActiveEntry();
- GURL savable_url = (active_entry) ? active_entry->url() :
- GURL::EmptyGURL();
- return SavePackage::IsSavableURL(savable_url);
+ return SavePackage::IsSavableURL(
+ (active_entry) ? active_entry->url() : GURL());
}
case IDS_CONTENT_CONTEXT_OPENFRAMENEWTAB:
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 9b59406..2200a38 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,11 +27,11 @@ static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params,
const GURL& url) {
params->page_id = page_id;
params->url = url;
- params->referrer = GURL::EmptyGURL();
+ params->referrer = GURL();
params->transition = PageTransition::TYPED;
params->redirects = std::vector<GURL>();
params->should_update_history = false;
- params->searchable_form_url = GURL::EmptyGURL();
+ params->searchable_form_url = GURL();
params->searchable_form_encoding = std::string();
params->password_form = PasswordForm();
params->security_info = std::string();
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index b3bb005..252b99f 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -123,9 +123,8 @@ void ToolbarModel::GetIconHoverText(std::wstring* text) {
switch (ssl.security_style()) {
case SECURITY_STYLE_AUTHENTICATED: {
if (ssl.has_mixed_content()) {
- SSLErrorInfo error_info =
- SSLErrorInfo::CreateError(SSLErrorInfo::MIXED_CONTENTS,
- NULL, GURL::EmptyGURL());
+ SSLErrorInfo error_info = SSLErrorInfo::CreateError(
+ SSLErrorInfo::MIXED_CONTENTS, NULL, GURL());
text->assign(error_info.short_description());
} else {
DCHECK(entry->url().has_host());
@@ -191,11 +190,11 @@ void ToolbarModel::CreateErrorText(NavigationEntry* entry, std::wstring* text) {
&errors);
if (ssl.has_mixed_content()) {
errors.push_back(SSLErrorInfo::CreateError(SSLErrorInfo::MIXED_CONTENTS,
- NULL, GURL::EmptyGURL()));
+ NULL, GURL()));
}
if (ssl.has_unsafe_content()) {
errors.push_back(SSLErrorInfo::CreateError(SSLErrorInfo::UNSAFE_CONTENTS,
- NULL, GURL::EmptyGURL()));
+ NULL, GURL()));
}
int error_count = static_cast<int>(errors.size());
diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc
index f8940ca..39f377f 100644
--- a/chrome/browser/views/bug_report_view.cc
+++ b/chrome/browser/views/bug_report_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -256,7 +256,7 @@ void BugReportView::ItemChanged(views::Combobox* combobox,
description_text_->SetReadOnly(is_phishing_report);
if (is_phishing_report) {
old_report_text_ = UTF16ToWide(description_text_->text());
- description_text_->SetText(EmptyString16());
+ description_text_->SetText(string16());
} else if (!old_report_text_.empty()) {
description_text_->SetText(WideToUTF16Hack(old_report_text_));
old_report_text_.clear();
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index ba48480..7e5f0b4 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -480,7 +480,7 @@ void CookiesView::Init() {
}
void CookiesView::ResetSearchQuery() {
- search_field_->SetText(EmptyWString());
+ search_field_->SetText(std::wstring());
clear_search_button_->SetEnabled(false);
UpdateSearchResults();
}
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index a6efdca..ce8bc00 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -758,7 +758,7 @@ void GeneralPageView::InitStartupGroup() {
startup_group_ = new OptionsGroupView(
contents, l10n_util::GetString(IDS_OPTIONS_STARTUP_GROUP_NAME),
- EmptyWString(), true);
+ std::wstring(), true);
}
void GeneralPageView::InitHomepageGroup() {
@@ -810,7 +810,7 @@ void GeneralPageView::InitHomepageGroup() {
homepage_group_ = new OptionsGroupView(
contents, l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_GROUP_NAME),
- EmptyWString(), true);
+ std::wstring(), true);
}
@@ -846,7 +846,7 @@ void GeneralPageView::InitDefaultSearchGroup() {
default_search_group_ = new OptionsGroupView(
contents, l10n_util::GetString(IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME),
- EmptyWString(), true);
+ std::wstring(), true);
}
void GeneralPageView::InitDefaultBrowserGroup() {
@@ -879,7 +879,7 @@ void GeneralPageView::InitDefaultBrowserGroup() {
default_browser_group_ = new OptionsGroupView(
contents, l10n_util::GetString(IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME),
- EmptyWString(), false);
+ std::wstring(), false);
default_browser_worker_->StartCheckDefaultBrowser();
}
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc
index 7c92725..c19fee8 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -105,10 +105,7 @@ class WebDataServiceTest : public testing::Test {
const string16& value,
std::vector<webkit_glue::FormField>* form_fields) {
form_fields->push_back(
- webkit_glue::FormField(EmptyString16(),
- name,
- EmptyString16(),
- value));
+ webkit_glue::FormField(string16(), name, string16(), value));
}
MessageLoopForUI message_loop_;
@@ -156,7 +153,7 @@ TEST_F(WebDataServiceTest, AutofillAdd) {
WebDataService::Handle handle;
static const int limit = 10;
handle = wds_->GetFormValuesForElementName(
- name1_, EmptyString16(), limit, &consumer);
+ name1_, string16(), limit, &consumer);
// The message loop will exit when the consumer is called.
MessageLoop::current()->Run();
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm
index 14ba3a5..359af9e 100644
--- a/chrome/common/platform_util_mac.mm
+++ b/chrome/common/platform_util_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -93,7 +93,7 @@ string16 GetVersionStringModifier() {
channel = @"stable";
return base::SysNSStringToUTF16(channel);
#else
- return EmptyString16();
+ return string16();
#endif
}
diff --git a/chrome/common/platform_util_win.cc b/chrome/common/platform_util_win.cc
index 1e4594b..01f1efb 100644
--- a/chrome/common/platform_util_win.cc
+++ b/chrome/common/platform_util_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -207,7 +207,7 @@ string16 GetVersionStringModifier() {
#if defined(GOOGLE_CHROME_BUILD)
return CurrentChromeChannel();
#else
- return EmptyString16();
+ return string16();
#endif
}
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 418bf4c..f04a110 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1870,9 +1870,9 @@ WebMediaPlayer* RenderView::createMediaPlayer(
// TODO(hclam): obtain the following parameters from |client|.
webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory =
new webkit_glue::MediaResourceLoaderBridgeFactory(
- GURL::EmptyGURL(), // referrer
- "null", // frame origin
- "null", // main_frame_origin
+ GURL(), // referrer
+ "null", // frame origin
+ "null", // main_frame_origin
base::GetCurrentProcId(),
appcache::kNoHostId,
routing_id());
@@ -2832,12 +2832,12 @@ GURL RenderView::GetAlternateErrorPageURL(const GURL& failed_url,
// we fetch alternate error pages over HTTP, we would be allowing a network
// attacker to manipulate the contents of the response if we tried to use
// the link doctor here.
- return GURL::EmptyGURL();
+ return GURL();
}
// Grab the base URL from the browser process.
if (!alternate_error_page_url_.is_valid())
- return GURL::EmptyGURL();
+ return GURL();
// Strip query params from the failed URL.
GURL::Replacements remove_params;