summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/string_util.h13
-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
-rw-r--r--views/controls/message_box_view.cc4
-rw-r--r--webkit/appcache/appcache_group.h4
-rw-r--r--webkit/appcache/appcache_host.cc10
-rw-r--r--webkit/appcache/appcache_host_unittest.cc7
-rw-r--r--webkit/appcache/appcache_request_handler.cc4
-rw-r--r--webkit/appcache/appcache_storage_impl.cc4
-rw-r--r--webkit/appcache/appcache_storage_unittest.cc10
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc70
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc4
-rw-r--r--webkit/appcache/manifest_parser_unittest.cc4
-rw-r--r--webkit/appcache/mock_appcache_storage.cc5
-rw-r--r--webkit/appcache/web_application_cache_host_impl.cc4
-rw-r--r--webkit/database/database_tracker.h4
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc8
40 files changed, 154 insertions, 158 deletions
diff --git a/base/string_util.h b/base/string_util.h
index f0fa6da..ee70a16 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -121,10 +121,15 @@ bool IsWprintfFormatPortable(const wchar_t* format);
#error Define string operations appropriately for your platform
#endif
-// Returns a reference to a globally unique empty string that functions can
-// return. Use this to avoid static construction of strings, not to replace
-// any and all uses of "std::string()" as nicer-looking sugar.
-// These functions are threadsafe.
+// These threadsafe functions return references to globally unique empty
+// strings.
+//
+// DO NOT USE THESE AS A GENERAL-PURPOSE SUBSTITUTE FOR DEFAULT CONSTRUCTORS.
+// There is only one case where you should use these: functions which need to
+// return a string by reference (e.g. as a class member accessor), and don't
+// have an empty string to use (e.g. in an error case). These should not be
+// used as initializers, function arguments, or return values for functions
+// which return by value or outparam.
const std::string& EmptyString();
const std::wstring& EmptyWString();
const string16& EmptyString16();
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;
diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc
index 2544c03..df6a580 100644
--- a/views/controls/message_box_view.cc
+++ b/views/controls/message_box_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.
@@ -48,7 +48,7 @@ MessageBoxView::MessageBoxView(int dialog_flags,
std::wstring MessageBoxView::GetInputText() {
if (prompt_field_)
return UTF16ToWideHack(prompt_field_->text());
- return EmptyWString();
+ return std::wstring();
}
bool MessageBoxView::IsCheckBoxSelected() {
diff --git a/webkit/appcache/appcache_group.h b/webkit/appcache/appcache_group.h
index 5cf3d99..e6f8972 100644
--- a/webkit/appcache/appcache_group.h
+++ b/webkit/appcache/appcache_group.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.
@@ -70,7 +70,7 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> {
// Starts an update for a doc loaded from an application cache.
void StartUpdateWithHost(AppCacheHost* host) {
- StartUpdateWithNewMasterEntry(host, GURL::EmptyGURL());
+ StartUpdateWithNewMasterEntry(host, GURL());
}
// Starts an update for a doc loaded using HTTP GET or equivalent with
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
index d35d61a..58212f5 100644
--- a/webkit/appcache/appcache_host.cc
+++ b/webkit/appcache/appcache_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.
@@ -54,12 +54,12 @@ void AppCacheHost::SelectCache(const GURL& document_url,
// if the resulting behavior is just too insane).
if (is_selection_pending()) {
service_->storage()->CancelDelegateCallbacks(this);
- pending_selected_manifest_url_ = GURL::EmptyGURL();
+ pending_selected_manifest_url_ = GURL();
pending_selected_cache_id_ = kNoCacheId;
} else if (associated_cache()) {
AssociateCache(NULL);
}
- new_master_entry_url_ = GURL::EmptyGURL();
+ new_master_entry_url_ = GURL();
// 6.9.6 The application cache selection algorithm.
// The algorithm is started here and continues in FinishCacheSelection,
@@ -93,7 +93,7 @@ void AppCacheHost::MarkAsForeignEntry(const GURL& document_url,
int64 cache_document_was_loaded_from) {
service_->storage()->MarkEntryAsForeign(
document_url, cache_document_was_loaded_from);
- SelectCache(document_url, kNoCacheId, GURL::EmptyGURL());
+ SelectCache(document_url, kNoCacheId, GURL());
}
void AppCacheHost::GetStatusWithCallback(GetStatusCallback* callback,
@@ -236,7 +236,7 @@ void AppCacheHost::LoadOrCreateGroup(const GURL& manifest_url) {
void AppCacheHost::OnGroupLoaded(AppCacheGroup* group,
const GURL& manifest_url) {
DCHECK(manifest_url == pending_selected_manifest_url_);
- pending_selected_manifest_url_ = GURL::EmptyGURL();
+ pending_selected_manifest_url_ = GURL();
FinishCacheSelection(NULL, group);
}
diff --git a/webkit/appcache/appcache_host_unittest.cc b/webkit/appcache/appcache_host_unittest.cc
index 3ded220..687125b 100644
--- a/webkit/appcache/appcache_host_unittest.cc
+++ b/webkit/appcache/appcache_host_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.
@@ -122,7 +122,7 @@ TEST_F(AppCacheHostTest, SelectNoCache) {
mock_frontend_.last_status_ = OBSOLETE;
AppCacheHost host(1, &mock_frontend_, &service_);
- host.SelectCache(GURL("http://whatever/"), kNoCacheId, GURL::EmptyGURL());
+ host.SelectCache(GURL("http://whatever/"), kNoCacheId, GURL());
// We should have received an OnCacheSelected msg
EXPECT_EQ(1, mock_frontend_.last_host_id_);
@@ -235,8 +235,7 @@ TEST_F(AppCacheHostTest, SetSwappableCache) {
EXPECT_FALSE(host.swappable_cache_.get());
scoped_refptr<AppCacheGroup> group1 =
- new AppCacheGroup(&service_, GURL::EmptyGURL(),
- service_.storage()->NewGroupId());
+ new AppCacheGroup(&service_, GURL(), service_.storage()->NewGroupId());
host.SetSwappableCache(group1);
EXPECT_FALSE(host.swappable_cache_.get());
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc
index 068535e..a17e7e5 100644
--- a/webkit/appcache/appcache_request_handler.cc
+++ b/webkit/appcache/appcache_request_handler.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.
@@ -63,7 +63,7 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadResource(
found_entry_ = AppCacheEntry();
found_fallback_entry_ = AppCacheEntry();
found_cache_id_ = kNoCacheId;
- found_manifest_url_ = GURL::EmptyGURL();
+ found_manifest_url_ = GURL();
found_network_namespace_ = false;
if (is_main_request_)
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc
index 06e88db..44c2365 100644
--- a/webkit/appcache/appcache_storage_impl.cc
+++ b/webkit/appcache/appcache_storage_impl.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.
@@ -765,7 +765,7 @@ void AppCacheStorageImpl::DeliverShortCircuitedFindMainResponse(
delegate_ref->delegate->OnMainResponseFound(
url, found_entry, AppCacheEntry(),
cache.get() ? cache->cache_id() : kNoCacheId,
- group.get() ? group->manifest_url() : GURL::EmptyGURL());
+ group.get() ? group->manifest_url() : GURL());
}
}
diff --git a/webkit/appcache/appcache_storage_unittest.cc b/webkit/appcache/appcache_storage_unittest.cc
index 083d566..65f3064 100644
--- a/webkit/appcache/appcache_storage_unittest.cc
+++ b/webkit/appcache/appcache_storage_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.
@@ -37,15 +37,13 @@ TEST_F(AppCacheStorageTest, AddRemoveCache) {
TEST_F(AppCacheStorageTest, AddRemoveGroup) {
MockAppCacheService service;
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, GURL::EmptyGURL(), 111);
+ scoped_refptr<AppCacheGroup> group = new AppCacheGroup(&service, GURL(), 111);
- EXPECT_EQ(group.get(),
- service.storage()->working_set()->GetGroup(GURL::EmptyGURL()));
+ EXPECT_EQ(group.get(), service.storage()->working_set()->GetGroup(GURL()));
service.storage()->working_set()->RemoveGroup(group);
- EXPECT_TRUE(!service.storage()->working_set()->GetGroup(GURL::EmptyGURL()));
+ EXPECT_TRUE(!service.storage()->working_set()->GetGroup(GURL()));
// Removing non-existing group from service should not fail.
MockAppCacheService dummy;
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index 4ed1224..b789710 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_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.
@@ -41,7 +41,7 @@ class MockFrontend : public AppCacheFrontend {
it != update_hosts_.end(); ++it) {
AppCacheHost* host = *it;
update_->StartUpdate(host,
- (host ? host->pending_master_entry_url() : GURL::EmptyGURL()));
+ (host ? host->pending_master_entry_url() : GURL()));
}
update_hosts_.clear(); // only trigger once
}
@@ -327,7 +327,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend mock_frontend;
AppCacheHost host(1, &mock_frontend, service_.get());
- update->StartUpdate(&host, GURL::EmptyGURL());
+ update->StartUpdate(&host, GURL());
// Verify state.
EXPECT_EQ(AppCacheUpdateJob::CACHE_ATTEMPT, update->update_type_);
@@ -377,7 +377,7 @@ class AppCacheUpdateJobTest : public testing::Test,
AppCacheUpdateJob* update = new AppCacheUpdateJob(service_.get(), group_);
group_->update_job_ = update;
- update->StartUpdate(&host4, GURL::EmptyGURL());
+ update->StartUpdate(&host4, GURL());
// Verify state after starting an update.
EXPECT_EQ(AppCacheUpdateJob::UPGRADE_ATTEMPT, update->update_type_);
@@ -424,7 +424,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
update->manifest_url_request_->SimulateError(-100);
@@ -456,7 +456,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
update->manifest_url_request_->SimulateError(-100);
@@ -491,7 +491,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -516,7 +516,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -547,7 +547,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -577,7 +577,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -602,7 +602,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -633,7 +633,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -710,7 +710,7 @@ class AppCacheUpdateJobTest : public testing::Test,
response_writer_.reset();
AppCacheUpdateJob* update = group_->update_job_;
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
WaitForUpdateToFinish();
@@ -728,7 +728,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -998,7 +998,7 @@ class AppCacheUpdateJobTest : public testing::Test,
cache->AddEntry(http_server_->TestServerPage("files/explicit1"),
AppCacheEntry(AppCacheEntry::MASTER, 111));
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1039,7 +1039,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1070,7 +1070,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1125,7 +1125,7 @@ class AppCacheUpdateJobTest : public testing::Test,
http_server_->TestServerPage("files/servererror"),
AppCacheEntry(AppCacheEntry::MASTER, 444));
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1188,7 +1188,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1224,7 +1224,7 @@ class AppCacheUpdateJobTest : public testing::Test,
AppCacheHost* host = MakeHost(1, frontend);
host->AssociateCache(cache);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1259,7 +1259,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1290,7 +1290,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1322,7 +1322,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1353,7 +1353,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1384,7 +1384,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1413,7 +1413,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
// Set up checks for when update job finishes.
do_checks_after_update_finished_ = true;
@@ -1447,7 +1447,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
// Set up checks for when update job finishes.
do_checks_after_update_finished_ = true;
@@ -1486,7 +1486,7 @@ class AppCacheUpdateJobTest : public testing::Test,
MockFrontend* frontend = MakeMockFrontend();
AppCacheHost* host = MakeHost(1, frontend);
- update->StartUpdate(host, GURL::EmptyGURL());
+ update->StartUpdate(host, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -1521,7 +1521,7 @@ class AppCacheUpdateJobTest : public testing::Test,
host1->AssociateCache(cache);
host2->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
EXPECT_TRUE(update->manifest_url_request_ != NULL);
// Set up checks for when update job finishes.
@@ -2072,7 +2072,7 @@ class AppCacheUpdateJobTest : public testing::Test,
AppCacheHost* host1 = MakeHost(1, frontend1);
host1->AssociateCache(cache);
- update->StartUpdate(NULL, GURL::EmptyGURL());
+ update->StartUpdate(NULL, GURL());
// Set up additional updates to be started while update is in progress.
MockFrontend* frontend2 = MakeMockFrontend();
@@ -2199,7 +2199,7 @@ class AppCacheUpdateJobTest : public testing::Test,
HttpHeadersRequestTestJob::Initialize("", "");
MockFrontend mock_frontend;
AppCacheHost host(1, &mock_frontend, service_.get());
- update->StartUpdate(&host, GURL::EmptyGURL());
+ update->StartUpdate(&host, GURL());
HttpHeadersRequestTestJob::Verify();
delete update;
@@ -2801,12 +2801,12 @@ TEST_F(AppCacheUpdateJobTest, AlreadyChecking) {
group->update_job_ = &update;
group->update_status_ = AppCacheGroup::CHECKING;
- update.StartUpdate(NULL, GURL::EmptyGURL());
+ update.StartUpdate(NULL, GURL());
EXPECT_EQ(AppCacheGroup::CHECKING, group->update_status());
MockFrontend mock_frontend;
AppCacheHost host(1, &mock_frontend, &service);
- update.StartUpdate(&host, GURL::EmptyGURL());
+ update.StartUpdate(&host, GURL());
MockFrontend::RaisedEvents events = mock_frontend.raised_events_;
size_t expected = 1;
@@ -2829,12 +2829,12 @@ TEST_F(AppCacheUpdateJobTest, AlreadyDownloading) {
group->update_job_ = &update;
group->update_status_ = AppCacheGroup::DOWNLOADING;
- update.StartUpdate(NULL, GURL::EmptyGURL());
+ update.StartUpdate(NULL, GURL());
EXPECT_EQ(AppCacheGroup::DOWNLOADING, group->update_status());
MockFrontend mock_frontend;
AppCacheHost host(1, &mock_frontend, &service);
- update.StartUpdate(&host, GURL::EmptyGURL());
+ update.StartUpdate(&host, GURL());
MockFrontend::RaisedEvents events = mock_frontend.raised_events_;
size_t expected = 2;
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index f999ad4..39a1b91 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_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.
@@ -401,7 +401,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
EXPECT_FALSE(job->is_delivering_error_response());
EXPECT_FALSE(job->has_been_started());
EXPECT_FALSE(job->has_been_killed());
- EXPECT_EQ(GURL::EmptyGURL(), job->manifest_url());
+ EXPECT_EQ(GURL(), job->manifest_url());
EXPECT_EQ(kNoCacheId, job->cache_id());
EXPECT_FALSE(job->entry().has_response_id());
diff --git a/webkit/appcache/manifest_parser_unittest.cc b/webkit/appcache/manifest_parser_unittest.cc
index 45ccbdd..2820884 100644
--- a/webkit/appcache/manifest_parser_unittest.cc
+++ b/webkit/appcache/manifest_parser_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.
@@ -62,7 +62,7 @@ TEST(ManifestParserTest, NoManifestUrl) {
const std::string kData("CACHE MANIFEST\r"
"relative/tobase.com\r"
"http://absolute.com/addme.com");
- const GURL kUrl = GURL::EmptyGURL();
+ const GURL kUrl;
EXPECT_TRUE(ParseManifest(kUrl, kData.c_str(), kData.length(), manifest));
EXPECT_TRUE(manifest.explicit_urls.empty());
EXPECT_TRUE(manifest.fallback_namespaces.empty());
diff --git a/webkit/appcache/mock_appcache_storage.cc b/webkit/appcache/mock_appcache_storage.cc
index 64a66a7..3c93479 100644
--- a/webkit/appcache/mock_appcache_storage.cc
+++ b/webkit/appcache/mock_appcache_storage.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.
@@ -335,8 +335,7 @@ void MockAppCacheStorage::ProcessFindResponseForMainRequest(
// Didn't find anything.
delegate_ref->delegate->OnMainResponseFound(
- url, AppCacheEntry(), AppCacheEntry(),
- kNoCacheId, GURL::EmptyGURL());
+ url, AppCacheEntry(), AppCacheEntry(), kNoCacheId, GURL());
}
void MockAppCacheStorage::ProcessMakeGroupObsolete(
diff --git a/webkit/appcache/web_application_cache_host_impl.cc b/webkit/appcache/web_application_cache_host_impl.cc
index 427ec87..b6586de 100644
--- a/webkit/appcache/web_application_cache_host_impl.cc
+++ b/webkit/appcache/web_application_cache_host_impl.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.
@@ -116,7 +116,7 @@ bool WebApplicationCacheHostImpl::selectCacheWithManifest(
is_new_master_entry_ = YES;
} else {
is_new_master_entry_ = NO;
- manifest_gurl = GURL::EmptyGURL();
+ manifest_gurl = GURL();
}
backend_->SelectCache(host_id_, document_url_,
kNoCacheId, manifest_gurl);
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 8d65109..24ea877 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.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.
@@ -119,7 +119,7 @@ class DatabaseTracker
class CachedOriginInfo : public OriginInfo {
public:
- CachedOriginInfo() : OriginInfo(EmptyString16(), 0, 0) {}
+ CachedOriginInfo() : OriginInfo(string16(), 0, 0) {}
void SetOrigin(const string16& origin) { origin_ = origin; }
void SetQuota(int64 new_quota) { quota_ = new_quota; }
void SetDatabaseSize(const string16& database_name, int64 new_size) {
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index 2c67a0b..ce5c94e 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// 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.
@@ -19,7 +19,7 @@ namespace {
// of a non-ASCII string.
std::string AsASCII(const WebString& string) {
if (!IsStringASCII(string))
- return EmptyString();
+ return std::string();
return UTF16ToASCII(string);
}
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index d283df5..7ca9ac0 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.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.
@@ -611,9 +611,9 @@ WebMediaPlayer* TestWebViewDelegate::createMediaPlayer(
// should be grouped together.
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,
0);