diff options
Diffstat (limited to 'content')
358 files changed, 1540 insertions, 1460 deletions
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc index 3e03b80..af33a42 100644 --- a/content/browser/accessibility/accessibility_tree_formatter.cc +++ b/content/browser/accessibility/accessibility_tree_formatter.cc @@ -55,7 +55,7 @@ AccessibilityTreeFormatter::BuildAccessibilityTree() { } void AccessibilityTreeFormatter::FormatAccessibilityTree( - string16* contents) { + base::string16* contents) { scoped_ptr<base::DictionaryValue> dict = BuildAccessibilityTree(); RecursiveFormatAccessibilityTree(*(dict.get()), contents); } @@ -76,9 +76,10 @@ void AccessibilityTreeFormatter::RecursiveBuildAccessibilityTree( } void AccessibilityTreeFormatter::RecursiveFormatAccessibilityTree( - const base::DictionaryValue& dict, string16* contents, int depth) { - string16 line = ToString(dict, string16(depth * kIndentSpaces, ' ')); - if (line.find(ASCIIToUTF16(kSkipString)) != string16::npos) + const base::DictionaryValue& dict, base::string16* contents, int depth) { + base::string16 line = + ToString(dict, base::string16(depth * kIndentSpaces, ' ')); + if (line.find(ASCIIToUTF16(kSkipString)) != base::string16::npos) return; *contents += line; @@ -98,8 +99,9 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->SetInteger("id", node.renderer_id()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& node, - const string16& indent) { +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& node, + const base::string16& indent) { int id_value; node.GetInteger("id", &id_value); return indent + base::IntToString16(id_value) + @@ -142,7 +144,7 @@ void AccessibilityTreeFormatter::SetFilters( } bool AccessibilityTreeFormatter::MatchesFilters( - const string16& text, bool default_result) const { + const base::string16& text, bool default_result) const { std::vector<Filter>::const_iterator iter = filters_.begin(); bool allow = default_result; for (iter = filters_.begin(); iter != filters_.end(); ++iter) { @@ -158,7 +160,7 @@ bool AccessibilityTreeFormatter::MatchesFilters( return allow; } -string16 AccessibilityTreeFormatter::FormatCoordinates( +base::string16 AccessibilityTreeFormatter::FormatCoordinates( const char* name, const char* x_name, const char* y_name, const base::DictionaryValue& value) { int x, y; @@ -170,12 +172,12 @@ string16 AccessibilityTreeFormatter::FormatCoordinates( } void AccessibilityTreeFormatter::WriteAttribute( - bool include_by_default, const std::string& attr, string16* line) { + bool include_by_default, const std::string& attr, base::string16* line) { WriteAttribute(include_by_default, UTF8ToUTF16(attr), line); } void AccessibilityTreeFormatter::WriteAttribute( - bool include_by_default, const string16& attr, string16* line) { + bool include_by_default, const base::string16& attr, base::string16* line) { if (attr.empty()) return; if (!MatchesFilters(attr, include_by_default)) diff --git a/content/browser/accessibility/accessibility_tree_formatter.h b/content/browser/accessibility/accessibility_tree_formatter.h index 006ee9a..a290886 100644 --- a/content/browser/accessibility/accessibility_tree_formatter.h +++ b/content/browser/accessibility/accessibility_tree_formatter.h @@ -52,7 +52,7 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { scoped_ptr<base::DictionaryValue> BuildAccessibilityTree(); // Dumps a BrowserAccessibility tree into a string. - void FormatAccessibilityTree(string16* contents); + void FormatAccessibilityTree(base::string16* contents); // A single filter specification. See GetAllowString() and GetDenyString() // for more information. @@ -62,10 +62,10 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { ALLOW_EMPTY, DENY }; - string16 match_str; + base::string16 match_str; Type type; - Filter(string16 match_str, Type type) + Filter(base::string16 match_str, Type type) : match_str(match_str), type(type) {} }; @@ -100,12 +100,12 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { protected: void RecursiveFormatAccessibilityTree(const BrowserAccessibility& node, - string16* contents, + base::string16* contents, int indent); void RecursiveBuildAccessibilityTree(const BrowserAccessibility& node, base::DictionaryValue* tree_node); void RecursiveFormatAccessibilityTree(const base::DictionaryValue& tree_node, - string16* contents, + base::string16* contents, int depth = 0); // Overridden by each platform to add the required attributes for each node @@ -113,27 +113,28 @@ class CONTENT_EXPORT AccessibilityTreeFormatter { void AddProperties(const BrowserAccessibility& node, base::DictionaryValue* dict); - string16 FormatCoordinates(const char* name, - const char* x_name, - const char* y_name, - const base::DictionaryValue& value); + base::string16 FormatCoordinates(const char* name, + const char* x_name, + const char* y_name, + const base::DictionaryValue& value); // Returns a platform specific representation of a BrowserAccessibility. // Should be zero or more complete lines, each with |prefix| prepended // (to indent each line). - string16 ToString(const base::DictionaryValue& node, const string16& indent); + base::string16 ToString(const base::DictionaryValue& node, + const base::string16& indent); void Initialize(); - bool MatchesFilters(const string16& text, bool default_result) const; + bool MatchesFilters(const base::string16& text, bool default_result) const; // Writes the given attribute string out to |line| if it matches the filters. void WriteAttribute(bool include_by_default, - const string16& attr, - string16* line); + const base::string16& attr, + base::string16* line); void WriteAttribute(bool include_by_default, const std::string& attr, - string16* line); + base::string16* line); BrowserAccessibility* root_; diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc index ae34ef5..da5da24 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_android.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc @@ -77,11 +77,12 @@ void AccessibilityTreeFormatter::AddProperties( dict->SetInteger("item_count", android_node->GetItemCount()); } -string16 AccessibilityTreeFormatter::ToString(const DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; - string16 class_value; + base::string16 class_value; dict.GetString("class", &class_value); WriteAttribute(true, UTF16ToUTF8(class_value), &line); diff --git a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc index 8dd6b93..0dc21ce 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_gtk.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_gtk.cc @@ -37,9 +37,10 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->SetInteger("id", node.renderer_id()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& node, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& node, + const base::string16& indent) { + base::string16 line; std::string role_value; node.GetString("role", &role_value); if (!role_value.empty()) diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm index 58881b4..021b5fd 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm @@ -161,9 +161,10 @@ void AccessibilityTreeFormatter::AddProperties(const BrowserAccessibility& node, dict->Set(kSizeDictAttr, PopulateSize(cocoa_node).release()); } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; NSArray* defaultAttributes = [NSArray arrayWithObjects:NSAccessibilityTitleAttribute, NSAccessibilityValueAttribute, diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc index 053e39b..e2cebc1 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc @@ -20,10 +20,10 @@ class AccessibilityRoleStateMap { public: static AccessibilityRoleStateMap* GetInstance(); - std::map<int32, string16> ia_role_string_map; - std::map<int32, string16> ia2_role_string_map; - std::map<int32, string16> ia_state_string_map; - std::map<int32, string16> ia2_state_string_map; + std::map<int32, base::string16> ia_role_string_map; + std::map<int32, base::string16> ia2_role_string_map; + std::map<int32, base::string16> ia_state_string_map; + std::map<int32, base::string16> ia2_state_string_map; private: AccessibilityRoleStateMap(); @@ -220,44 +220,44 @@ AccessibilityRoleStateMap::AccessibilityRoleStateMap() { } // namespace. -string16 IAccessibleRoleToString(int32 ia_role) { +base::string16 IAccessibleRoleToString(int32 ia_role) { return AccessibilityRoleStateMap::GetInstance()->ia_role_string_map[ia_role]; } -string16 IAccessible2RoleToString(int32 ia_role) { +base::string16 IAccessible2RoleToString(int32 ia_role) { return AccessibilityRoleStateMap::GetInstance()->ia2_role_string_map[ia_role]; } void IAccessibleStateToStringVector(int32 ia_state, - std::vector<string16>* result) { - const std::map<int32, string16>& state_string_map = + std::vector<base::string16>* result) { + const std::map<int32, base::string16>& state_string_map = AccessibilityRoleStateMap::GetInstance()->ia_state_string_map; - std::map<int32, string16>::const_iterator it; + std::map<int32, base::string16>::const_iterator it; for (it = state_string_map.begin(); it != state_string_map.end(); ++it) { if (it->first & ia_state) result->push_back(it->second); } } -string16 IAccessibleStateToString(int32 ia_state) { - std::vector<string16> strings; +base::string16 IAccessibleStateToString(int32 ia_state) { + std::vector<base::string16> strings; IAccessibleStateToStringVector(ia_state, &strings); return JoinString(strings, ','); } void IAccessible2StateToStringVector(int32 ia2_state, - std::vector<string16>* result) { - const std::map<int32, string16>& state_string_map = + std::vector<base::string16>* result) { + const std::map<int32, base::string16>& state_string_map = AccessibilityRoleStateMap::GetInstance()->ia2_state_string_map; - std::map<int32, string16>::const_iterator it; + std::map<int32, base::string16>::const_iterator it; for (it = state_string_map.begin(); it != state_string_map.end(); ++it) { if (it->first & ia2_state) result->push_back(it->second); } } -string16 IAccessible2StateToString(int32 ia2_state) { - std::vector<string16> strings; +base::string16 IAccessible2StateToString(int32 ia2_state) { + std::vector<base::string16> strings; IAccessible2StateToStringVector(ia2_state, &strings); return JoinString(strings, ','); } diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h index 1baf20d..86b377a 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h @@ -13,14 +13,14 @@ namespace content { -CONTENT_EXPORT string16 IAccessibleRoleToString(int32 ia_role); -CONTENT_EXPORT string16 IAccessible2RoleToString(int32 ia_role); -CONTENT_EXPORT string16 IAccessibleStateToString(int32 ia_state); +CONTENT_EXPORT base::string16 IAccessibleRoleToString(int32 ia_role); +CONTENT_EXPORT base::string16 IAccessible2RoleToString(int32 ia_role); +CONTENT_EXPORT base::string16 IAccessibleStateToString(int32 ia_state); CONTENT_EXPORT void IAccessibleStateToStringVector( - int32 ia_state, std::vector<string16>* result); -CONTENT_EXPORT string16 IAccessible2StateToString(int32 ia2_state); + int32 ia_state, std::vector<base::string16>* result); +CONTENT_EXPORT base::string16 IAccessible2StateToString(int32 ia2_state); CONTENT_EXPORT void IAccessible2StateToStringVector( - int32 ia_state, std::vector<string16>* result); + int32 ia_state, std::vector<base::string16>* result); } // namespace content diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc index 679843d..c50b526 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_win.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc @@ -76,7 +76,7 @@ void AccessibilityTreeFormatter::AddProperties( if (hresult == S_OK) dict->SetString("value", msaa_variant.m_str); - std::vector<string16> state_strings; + std::vector<base::string16> state_strings; int32 ia_state = acc_obj->ia_state(); // Avoid flakiness: these states depend on whether the window is focused @@ -87,16 +87,16 @@ void AccessibilityTreeFormatter::AddProperties( IAccessibleStateToStringVector(ia_state, &state_strings); IAccessible2StateToStringVector(acc_obj->ia2_state(), &state_strings); base::ListValue* states = new base::ListValue; - for (std::vector<string16>::const_iterator it = state_strings.begin(); + for (std::vector<base::string16>::const_iterator it = state_strings.begin(); it != state_strings.end(); ++it) { states->AppendString(UTF16ToUTF8(*it)); } dict->Set("states", states); - const std::vector<string16>& ia2_attributes = acc_obj->ia2_attributes(); + const std::vector<base::string16>& ia2_attributes = acc_obj->ia2_attributes(); base::ListValue* attributes = new base::ListValue; - for (std::vector<string16>::const_iterator it = ia2_attributes.begin(); + for (std::vector<base::string16>::const_iterator it = ia2_attributes.begin(); it != ia2_attributes.end(); ++it) { attributes->AppendString(UTF16ToUTF8(*it)); @@ -199,15 +199,16 @@ void AccessibilityTreeFormatter::AddProperties( } } -string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, - const string16& indent) { - string16 line; +base::string16 AccessibilityTreeFormatter::ToString( + const base::DictionaryValue& dict, + const base::string16& indent) { + base::string16 line; - string16 role_value; + base::string16 role_value; dict.GetString("role", &role_value); WriteAttribute(true, UTF16ToUTF8(role_value), &line); - string16 name_value; + base::string16 name_value; dict.GetString("name", &name_value); WriteAttribute(true, base::StringPrintf(L"name='%ls'", name_value.c_str()), &line); @@ -220,7 +221,7 @@ string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, switch (value->GetType()) { case base::Value::TYPE_STRING: { - string16 string_value; + base::string16 string_value; value->GetAsString(&string_value); WriteAttribute(false, StringPrintf(L"%ls='%ls'", @@ -257,7 +258,7 @@ string16 AccessibilityTreeFormatter::ToString(const base::DictionaryValue& dict, for (base::ListValue::const_iterator it = list_value->begin(); it != list_value->end(); ++it) { - string16 string_value; + base::string16 string_value; if ((*it)->GetAsString(&string_value)) WriteAttribute(false, string_value, &line); } diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc index 7808cc1..5203af6 100644 --- a/content/browser/accessibility/accessibility_ui.cc +++ b/content/browser/accessibility/accessibility_ui.cc @@ -233,7 +233,7 @@ void AccessibilityUI::RequestAccessibilityTree(const base::ListValue* args) { } scoped_ptr<AccessibilityTreeFormatter> formatter( AccessibilityTreeFormatter::Create(rvh)); - string16 accessibility_contents_utf16; + base::string16 accessibility_contents_utf16; BrowserAccessibilityManager* manager = host_view->GetBrowserAccessibilityManager(); if (!manager) { diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc index 8131513..bb35348 100644 --- a/content/browser/accessibility/accessibility_win_browsertest.cc +++ b/content/browser/accessibility/accessibility_win_browsertest.cc @@ -226,7 +226,7 @@ class AccessibleChecker { void CheckAccessibleValue(IAccessible* accessible); void CheckAccessibleState(IAccessible* accessible); void CheckAccessibleChildren(IAccessible* accessible); - string16 RoleVariantToString(const base::win::ScopedVariant& role); + base::string16 RoleVariantToString(const base::win::ScopedVariant& role); // Expected accessible name. Checked against IAccessible::get_accName. std::wstring name_; @@ -403,13 +403,13 @@ void AccessibleChecker::CheckAccessibleChildren(IAccessible* parent) { } } -string16 AccessibleChecker::RoleVariantToString( +base::string16 AccessibleChecker::RoleVariantToString( const base::win::ScopedVariant& role) { if (role.type() == VT_I4) return IAccessibleRoleToString(V_I4(&role)); if (role.type() == VT_BSTR) - return string16(V_BSTR(&role), SysStringLen(V_BSTR(&role))); - return string16(); + return base::string16(V_BSTR(&role), SysStringLen(V_BSTR(&role))); + return base::string16(); } } // namespace diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 45f2201..223cd8d 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -444,17 +444,17 @@ bool BrowserAccessibility::GetStringAttribute( return false; } -string16 BrowserAccessibility::GetString16Attribute( +base::string16 BrowserAccessibility::GetString16Attribute( StringAttribute attribute) const { std::string value_utf8; if (!GetStringAttribute(attribute, &value_utf8)) - return string16(); + return base::string16(); return UTF8ToUTF16(value_utf8); } bool BrowserAccessibility::GetString16Attribute( StringAttribute attribute, - string16* value) const { + base::string16* value) const { std::string value_utf8; if (!GetStringAttribute(attribute, &value_utf8)) return false; @@ -522,7 +522,7 @@ bool BrowserAccessibility::GetHtmlAttribute( } bool BrowserAccessibility::GetHtmlAttribute( - const char* html_attr, string16* value) const { + const char* html_attr, base::string16* value) const { std::string value_utf8; if (!GetHtmlAttribute(html_attr, &value_utf8)) return false; @@ -537,7 +537,7 @@ bool BrowserAccessibility::GetAriaTristate( *is_defined = false; *is_mixed = false; - string16 value; + base::string16 value; if (!GetHtmlAttribute(html_attr, &value) || value.empty() || EqualsASCII(value, "undefined")) { diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 1f858f1..701010f 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h @@ -192,7 +192,7 @@ class CONTENT_EXPORT BrowserAccessibility { // need to distinguish between the default value and a missing attribute), // and another that returns the default value for that type if the // attribute is not present. In addition, strings can be returned as - // either std::string or string16, for convenience. + // either std::string or base::string16, for convenience. bool HasBoolAttribute(AccessibilityNodeData::BoolAttribute attr) const; bool GetBoolAttribute(AccessibilityNodeData::BoolAttribute attr) const; @@ -217,8 +217,8 @@ class CONTENT_EXPORT BrowserAccessibility { std::string* value) const; bool GetString16Attribute(AccessibilityNodeData::StringAttribute attribute, - string16* value) const; - string16 GetString16Attribute( + base::string16* value) const; + base::string16 GetString16Attribute( AccessibilityNodeData::StringAttribute attribute) const; bool HasIntListAttribute( @@ -234,7 +234,7 @@ class CONTENT_EXPORT BrowserAccessibility { // Retrieve the value of a html attribute from the attribute map and // returns true if found. - bool GetHtmlAttribute(const char* attr, string16* value) const; + bool GetHtmlAttribute(const char* attr, base::string16* value) const; bool GetHtmlAttribute(const char* attr, std::string* value) const; // Utility method to handle special cases for ARIA booleans, tristates and diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index 433c7a1..d5920be 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc @@ -40,7 +40,7 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const { return false; // Headings with text can drop their children. - string16 name = GetText(); + base::string16 name = GetText(); if (role() == blink::WebAXRoleHeading && !name.empty()) return true; @@ -168,15 +168,15 @@ const char* BrowserAccessibilityAndroid::GetClassName() const { return class_name; } -string16 BrowserAccessibilityAndroid::GetText() const { +base::string16 BrowserAccessibilityAndroid::GetText() const { if (IsIframe() || role() == blink::WebAXRoleWebArea) { - return string16(); + return base::string16(); } - string16 description = GetString16Attribute( + base::string16 description = GetString16Attribute( AccessibilityNodeData::ATTR_DESCRIPTION); - string16 text; + base::string16 text; if (!name().empty()) text = base::UTF8ToUTF16(name()); else if (!description.empty()) @@ -320,7 +320,7 @@ int BrowserAccessibilityAndroid::GetTextChangeRemovedCount() const { return (old_len - left - right); } -string16 BrowserAccessibilityAndroid::GetTextChangeBeforeText() const { +base::string16 BrowserAccessibilityAndroid::GetTextChangeBeforeText() const { return old_value_; } @@ -365,7 +365,7 @@ bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const { } bool BrowserAccessibilityAndroid::IsIframe() const { - string16 html_tag = GetString16Attribute( + base::string16 html_tag = GetString16Attribute( AccessibilityNodeData::ATTR_HTML_TAG); return html_tag == ASCIIToUTF16("iframe"); } @@ -383,7 +383,7 @@ void BrowserAccessibilityAndroid::PostInitialize() { if (role_ == blink::WebAXRoleAlert && first_time_) manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); - string16 live; + base::string16 live; if (GetString16Attribute( AccessibilityNodeData::ATTR_CONTAINER_LIVE_STATUS, &live)) { NotifyLiveRegionUpdate(live); @@ -392,12 +392,13 @@ void BrowserAccessibilityAndroid::PostInitialize() { first_time_ = false; } -void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate(string16& aria_live) { +void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate( + base::string16& aria_live) { if (!EqualsASCII(aria_live, aria_strings::kAriaLivePolite) && !EqualsASCII(aria_live, aria_strings::kAriaLiveAssertive)) return; - string16 text = GetText(); + base::string16 text = GetText(); if (cached_text_ != text) { if (!text.empty()) { manager_->NotifyAccessibilityEvent(blink::WebAXEventShow, diff --git a/content/browser/accessibility/browser_accessibility_android.h b/content/browser/accessibility/browser_accessibility_android.h index 7cb979b..cb882f4 100644 --- a/content/browser/accessibility/browser_accessibility_android.h +++ b/content/browser/accessibility/browser_accessibility_android.h @@ -30,7 +30,7 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { bool IsVisibleToUser() const; const char* GetClassName() const; - string16 GetText() const; + base::string16 GetText() const; int GetItemIndex() const; int GetItemCount() const; @@ -43,7 +43,7 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { int GetTextChangeFromIndex() const; int GetTextChangeAddedCount() const; int GetTextChangeRemovedCount() const; - string16 GetTextChangeBeforeText() const; + base::string16 GetTextChangeBeforeText() const; int GetSelectionStart() const; int GetSelectionEnd() const; @@ -59,12 +59,12 @@ class BrowserAccessibilityAndroid : public BrowserAccessibility { bool HasOnlyStaticTextChildren() const; bool IsIframe() const; - void NotifyLiveRegionUpdate(string16& aria_live); + void NotifyLiveRegionUpdate(base::string16& aria_live); - string16 cached_text_; + base::string16 cached_text_; bool first_time_; - string16 old_value_; - string16 new_value_; + base::string16 old_value_; + base::string16 new_value_; DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); }; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 15ac608..9364dbb 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -569,7 +569,7 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSString*)invalid { - string16 invalidUTF; + base::string16 invalidUTF; if (!browserAccessibility_->GetHtmlAttribute("aria-invalid", &invalidUTF)) return NULL; NSString* invalid = base::SysUTF16ToNSString(invalidUTF); @@ -1296,10 +1296,10 @@ NSDictionary* attributeToMethodNameMap = nil; nil]]; } else if ([role isEqualToString:NSAccessibilityRowRole]) { if (browserAccessibility_->parent()) { - string16 parentRole; + base::string16 parentRole; browserAccessibility_->parent()->GetHtmlAttribute( "role", &parentRole); - const string16 treegridRole(ASCIIToUTF16("treegrid")); + const base::string16 treegridRole(ASCIIToUTF16("treegrid")); if (parentRole == treegridRole) { [ret addObjectsFromArray:[NSArray arrayWithObjects: NSAccessibilityDisclosingAttribute, diff --git a/content/browser/accessibility/browser_accessibility_state_impl_win.cc b/content/browser/accessibility/browser_accessibility_state_impl_win.cc index 824055f..28f05e0 100644 --- a/content/browser/accessibility/browser_accessibility_state_impl_win.cc +++ b/content/browser/accessibility/browser_accessibility_state_impl_win.cc @@ -57,7 +57,7 @@ void BrowserAccessibilityStateImpl::UpdatePlatformSpecificHistograms() { for (size_t i = 0; i < module_count; i++) { TCHAR filename[MAX_PATH]; GetModuleFileName(modules[i], filename, sizeof(filename)); - string16 module_name(base::FilePath(filename).BaseName().value()); + base::string16 module_name(base::FilePath(filename).BaseName().value()); if (LowerCaseEqualsASCII(module_name, "fsdomsrv.dll")) jaws = true; if (LowerCaseEqualsASCII(module_name, "vbufbackend_gecko_ia2.dll")) diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 801a2d7..fe21c82 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc @@ -58,7 +58,7 @@ class BrowserAccessibilityRelation CONTENT_EXPORT virtual ~BrowserAccessibilityRelation() {} CONTENT_EXPORT void Initialize(BrowserAccessibilityWin* owner, - const string16& type); + const base::string16& type); CONTENT_EXPORT void AddTarget(int target_id); // IAccessibleRelation methods. @@ -75,13 +75,13 @@ class BrowserAccessibilityRelation } private: - string16 type_; + base::string16 type_; base::win::ScopedComPtr<BrowserAccessibilityWin> owner_; std::vector<int> target_ids_; }; void BrowserAccessibilityRelation::Initialize(BrowserAccessibilityWin* owner, - const string16& type) { + const base::string16& type) { owner_ = owner; type_ = type; } @@ -564,7 +564,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accValue(VARIANT var_id, if (target->ia_role() == ROLE_SYSTEM_PROGRESSBAR || target->ia_role() == ROLE_SYSTEM_SCROLLBAR || target->ia_role() == ROLE_SYSTEM_SLIDER) { - string16 value_text = target->GetValueText(); + base::string16 value_text = target->GetValueText(); *value = SysAllocString(value_text.c_str()); DCHECK(*value); return S_OK; @@ -578,7 +578,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accValue(VARIANT var_id, AccessibilityNodeData::ATTR_COLOR_VALUE_GREEN); int b = target->GetIntAttribute( AccessibilityNodeData::ATTR_COLOR_VALUE_BLUE); - string16 value_text; + base::string16 value_text; value_text = base::IntToString16((r * 100) / 255) + L"% red " + base::IntToString16((g * 100) / 255) + L"% green " + base::IntToString16((b * 100) / 255) + L"% blue"; @@ -684,7 +684,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_attributes(BSTR* attributes) { // The iaccessible2 attributes are a set of key-value pairs // separated by semicolons, with a colon between the key and the value. - string16 str; + base::string16 str; for (unsigned int i = 0; i < ia2_attributes_.size(); ++i) { if (i != 0) str += L';'; @@ -1133,7 +1133,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnDescription(long column, BrowserAccessibilityWin* cell = static_cast<BrowserAccessibilityWin*>( manager_->GetFromRendererID(cell_id)); if (cell && cell->role_ == blink::WebAXRoleColumnHeader) { - string16 cell_name = cell->GetString16Attribute( + base::string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { *description = SysAllocString(cell_name.c_str()); @@ -1320,7 +1320,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowDescription(long row, BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); if (cell && cell->role_ == blink::WebAXRoleRowHeader) { - string16 cell_name = cell->GetString16Attribute( + base::string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { *description = SysAllocString(cell_name.c_str()); @@ -1926,7 +1926,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_characterExtents( if (!out_x || !out_y || !out_width || !out_height) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &offset); if (offset < 0 || offset > static_cast<LONG>(text_str.size())) @@ -2010,7 +2010,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_text(LONG start_offset, if (!text) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); // Handle special text offsets. HandleSpecialTextOffset(text_str, &start_offset); @@ -2031,7 +2031,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_text(LONG start_offset, if (end_offset > len) return E_INVALIDARG; - string16 substr = text_str.substr(start_offset, end_offset - start_offset); + base::string16 substr = text_str.substr(start_offset, + end_offset - start_offset); if (substr.empty()) return S_FALSE; @@ -2061,7 +2062,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textAtOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = FindBoundary( text_str, boundary_type, offset, ui::BACKWARDS_DIRECTION); @@ -2091,7 +2092,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textBeforeOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = FindBoundary( text_str, boundary_type, offset, ui::BACKWARDS_DIRECTION); @@ -2120,7 +2121,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_textAfterOffset( return S_FALSE; } - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); *start_offset = offset; *end_offset = FindBoundary( @@ -2135,7 +2136,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_newText(IA2TextSegment* new_text) { if (!new_text) return E_INVALIDARG; - string16 text = TextForIAccessibleText(); + base::string16 text = TextForIAccessibleText(); new_text->text = SysAllocString(text.c_str()); new_text->start = 0; @@ -2196,7 +2197,7 @@ STDMETHODIMP BrowserAccessibilityWin::addSelection(LONG start_offset, if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &start_offset); HandleSpecialTextOffset(text_str, &end_offset); @@ -2219,7 +2220,7 @@ STDMETHODIMP BrowserAccessibilityWin::setCaretOffset(LONG offset) { if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &offset); manager_->SetTextSelection(*this, offset, offset); return S_OK; @@ -2234,7 +2235,7 @@ STDMETHODIMP BrowserAccessibilityWin::setSelection(LONG selection_index, if (selection_index != 0) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); HandleSpecialTextOffset(text_str, &start_offset); HandleSpecialTextOffset(text_str, &end_offset); @@ -2429,7 +2430,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_nodeInfo( return E_INVALIDARG; } - string16 tag; + base::string16 tag; if (GetString16Attribute(AccessibilityNodeData::ATTR_HTML_TAG, &tag)) *node_name = SysAllocString(tag.c_str()); else @@ -2522,7 +2523,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_computedStyle( // We only cache a single style property for now: DISPLAY - string16 display; + base::string16 display; if (max_style_properties == 0 || !GetString16Attribute(AccessibilityNodeData::ATTR_DISPLAY, &display)) { *num_style_properties = 0; @@ -2550,10 +2551,10 @@ STDMETHODIMP BrowserAccessibilityWin::get_computedStyleForProperties( // We only cache a single style property for now: DISPLAY for (unsigned short i = 0; i < num_style_properties; ++i) { - string16 name = (LPCWSTR)style_properties[i]; + base::string16 name = (LPCWSTR)style_properties[i]; StringToLowerASCII(&name); if (name == L"display") { - string16 display = GetString16Attribute( + base::string16 display = GetString16Attribute( AccessibilityNodeData::ATTR_DISPLAY); style_values[i] = SysAllocString(display.c_str()); } else { @@ -2713,7 +2714,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_unclippedSubstringBounds( if (!out_x || !out_y || !out_width || !out_height) return E_INVALIDARG; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); if (start_index > text_str.size() || end_index > text_str.size() || start_index > end_index) { @@ -2738,7 +2739,7 @@ STDMETHODIMP BrowserAccessibilityWin::scrollToSubstring( if (!instance_active_) return E_FAIL; - const string16& text_str = TextForIAccessibleText(); + const base::string16& text_str = TextForIAccessibleText(); if (start_index > text_str.size() || end_index > text_str.size() || start_index > end_index) { @@ -2958,7 +2959,7 @@ void BrowserAccessibilityWin::PreInitialize() { for (size_t i = 0; i < unique_cell_ids.size(); ++i) { if (unique_cell_ids[i] == renderer_id_) { ia2_attributes_.push_back( - string16(L"table-cell-index:") + base::IntToString16(i)); + base::string16(L"table-cell-index:") + base::IntToString16(i)); } } } @@ -3097,7 +3098,7 @@ void BrowserAccessibilityWin::PostInitialize() { manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); // Fire events if text has changed. - string16 text = TextForIAccessibleText(); + base::string16 text = TextForIAccessibleText(); if (previous_text_ != text) { if (!previous_text_.empty() && !text.empty()) { manager_->NotifyAccessibilityEvent( @@ -3185,7 +3186,7 @@ BrowserAccessibilityWin* BrowserAccessibilityWin::GetTargetFromChildID( HRESULT BrowserAccessibilityWin::GetStringAttributeAsBstr( AccessibilityNodeData::StringAttribute attribute, BSTR* value_bstr) { - string16 str; + base::string16 str; if (!GetString16Attribute(attribute, &str)) return S_FALSE; @@ -3202,7 +3203,7 @@ HRESULT BrowserAccessibilityWin::GetStringAttributeAsBstr( void BrowserAccessibilityWin::StringAttributeToIA2( AccessibilityNodeData::StringAttribute attribute, const char* ia2_attr) { - string16 value; + base::string16 value; if (GetString16Attribute(attribute, &value)) ia2_attributes_.push_back(ASCIIToUTF16(ia2_attr) + L":" + value); } @@ -3227,9 +3228,9 @@ void BrowserAccessibilityWin::IntAttributeToIA2( } } -string16 BrowserAccessibilityWin::GetValueText() { +base::string16 BrowserAccessibilityWin::GetValueText() { float fval; - string16 value = UTF8ToUTF16(value_); + base::string16 value = UTF8ToUTF16(value_); if (value.empty() && GetFloatAttribute(AccessibilityNodeData::ATTR_VALUE_FOR_RANGE, &fval)) { value = UTF8ToUTF16(base::DoubleToString(fval)); @@ -3237,15 +3238,16 @@ string16 BrowserAccessibilityWin::GetValueText() { return value; } -string16 BrowserAccessibilityWin::TextForIAccessibleText() { +base::string16 BrowserAccessibilityWin::TextForIAccessibleText() { if (IsEditableText()) return UTF8ToUTF16(value_); return (role_ == blink::WebAXRoleStaticText) ? UTF8ToUTF16(name_) : hypertext_; } -void BrowserAccessibilityWin::HandleSpecialTextOffset(const string16& text, - LONG* offset) { +void BrowserAccessibilityWin::HandleSpecialTextOffset( + const base::string16& text, + LONG* offset) { if (*offset == IA2_TEXT_OFFSET_LENGTH) *offset = static_cast<LONG>(text.size()); else if (*offset == IA2_TEXT_OFFSET_CARET) @@ -3268,7 +3270,7 @@ ui::TextBoundaryType BrowserAccessibilityWin::IA2TextBoundaryToTextBoundary( } LONG BrowserAccessibilityWin::FindBoundary( - const string16& text, + const base::string16& text, IA2TextBoundaryType ia2_boundary, LONG start_offset, ui::TextBoundaryDirection direction) { @@ -3345,7 +3347,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { if (!HasState(blink::WebAXStateReadonly)) ia2_state_ |= IA2_STATE_EDITABLE; - string16 invalid; + base::string16 invalid; if (GetHtmlAttribute("aria-invalid", &invalid)) ia2_state_ |= IA2_STATE_INVALID_ENTRY; @@ -3355,7 +3357,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { if (GetBoolAttribute(AccessibilityNodeData::ATTR_CAN_SET_VALUE)) ia2_state_ |= IA2_STATE_EDITABLE; - string16 html_tag = GetString16Attribute( + base::string16 html_tag = GetString16Attribute( AccessibilityNodeData::ATTR_HTML_TAG); ia_role_ = 0; ia2_role_ = 0; @@ -3469,7 +3471,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_state_ |= STATE_SYSTEM_READONLY; break; case blink::WebAXRoleGroup: { - string16 aria_role = GetString16Attribute( + base::string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"group" || html_tag == L"fieldset") { ia_role_ = ROLE_SYSTEM_GROUPING; @@ -3667,7 +3669,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_role_ = ROLE_SYSTEM_PAGETAB; break; case blink::WebAXRoleTable: { - string16 aria_role = GetString16Attribute( + base::string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"treegrid") { ia_role_ = ROLE_SYSTEM_OUTLINE; diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h index 1bb6ee2..992b3d1 100644 --- a/content/browser/accessibility/browser_accessibility_win.h +++ b/content/browser/accessibility/browser_accessibility_win.h @@ -86,8 +86,8 @@ BrowserAccessibilityWin // Mappings from roles and states to human readable strings. Initialize // with |InitializeStringMaps|. - static std::map<int32, string16> role_string_map; - static std::map<int32, string16> state_string_map; + static std::map<int32, base::string16> role_string_map; + static std::map<int32, base::string16> state_string_map; CONTENT_EXPORT BrowserAccessibilityWin(); @@ -765,10 +765,10 @@ BrowserAccessibilityWin // Accessors. int32 ia_role() const { return ia_role_; } int32 ia_state() const { return ia_state_; } - const string16& role_name() const { return role_name_; } + const base::string16& role_name() const { return role_name_; } int32 ia2_role() const { return ia2_role_; } int32 ia2_state() const { return ia2_state_; } - const std::vector<string16>& ia2_attributes() const { + const std::vector<base::string16>& ia2_attributes() const { return ia2_attributes_; } @@ -813,15 +813,15 @@ BrowserAccessibilityWin // Get the value text, which might come from the floating-point // value for some roles. - string16 GetValueText(); + base::string16 GetValueText(); // Get the text of this node for the purposes of IAccessibleText - it may // be the name, it may be the value, etc. depending on the role. - string16 TextForIAccessibleText(); + base::string16 TextForIAccessibleText(); // If offset is a member of IA2TextSpecialOffsets this function updates the // value of offset and returns, otherwise offset remains unchanged. - void HandleSpecialTextOffset(const string16& text, LONG* offset); + void HandleSpecialTextOffset(const base::string16& text, LONG* offset); // Convert from a IA2TextBoundaryType to a ui::TextBoundaryType. ui::TextBoundaryType IA2TextBoundaryToTextBoundary(IA2TextBoundaryType type); @@ -829,7 +829,7 @@ BrowserAccessibilityWin // Search forwards (direction == 1) or backwards (direction == -1) // from the given offset until the given boundary is found, and // return the offset of that boundary. - LONG FindBoundary(const string16& text, + LONG FindBoundary(const base::string16& text, IA2TextBoundaryType ia2_boundary, LONG start_offset, ui::TextBoundaryDirection direction); @@ -846,26 +846,26 @@ BrowserAccessibilityWin // IAccessible role and state. int32 ia_role_; int32 ia_state_; - string16 role_name_; + base::string16 role_name_; // IAccessible2 role and state. int32 ia2_role_; int32 ia2_state_; // IAccessible2 attributes. - std::vector<string16> ia2_attributes_; + std::vector<base::string16> ia2_attributes_; // True in Initialize when the object is first created, and false // subsequent times. bool first_time_; // The previous text, before the last update to this object. - string16 previous_text_; + base::string16 previous_text_; // The old text to return in IAccessibleText::get_oldText - this is like // previous_text_ except that it's NOT updated when the object // is initialized again but the text doesn't change. - string16 old_text_; + base::string16 old_text_; // The previous state, used to see if there was a state change. int32 old_ia_state_; @@ -874,7 +874,7 @@ BrowserAccessibilityWin std::vector<BrowserAccessibilityRelation*> relations_; // The text of this node including embedded hyperlink characters. - string16 hypertext_; + base::string16 hypertext_; // Maps the |hypertext_| embedded character offset to an index in // |hyperlinks_|. diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc index edb572f..c1159e6 100644 --- a/content/browser/accessibility/browser_accessibility_win_unittest.cc +++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc @@ -219,7 +219,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { base::win::ScopedBstr name; hr = text_accessible->get_accName(childid_self, name.Receive()); ASSERT_EQ(S_OK, hr); - EXPECT_EQ(L"old text", string16(name)); + EXPECT_EQ(L"old text", base::string16(name)); name.Reset(); text_dispatch.Release(); @@ -250,7 +250,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { hr = text_accessible->get_accName(childid_self, name.Receive()); ASSERT_EQ(S_OK, hr); - EXPECT_EQ(L"new text", string16(name)); + EXPECT_EQ(L"new text", base::string16(name)); text_dispatch.Release(); text_accessible.Release(); @@ -354,7 +354,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) { base::win::ScopedBstr text; ASSERT_EQ(S_OK, text1_obj->get_text(0, text1_len, text.Receive())); - ASSERT_EQ(text1_value, base::UTF16ToUTF8(string16(text))); + ASSERT_EQ(text1_value, base::UTF16ToUTF8(base::string16(text))); text.Reset(); ASSERT_EQ(S_OK, text1_obj->get_text(0, 4, text.Receive())); @@ -452,7 +452,7 @@ TEST_F(BrowserAccessibilityTest, TestSimpleHypertext) { base::win::ScopedBstr text; ASSERT_EQ(S_OK, root_obj->get_text(0, text_len, text.Receive())); - EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(string16(text))); + EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(base::string16(text))); long hyperlink_count; ASSERT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count)); @@ -548,7 +548,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { const std::string embed = base::UTF16ToUTF8( BrowserAccessibilityWin::kEmbeddedCharacter); EXPECT_EQ(text1_name + embed + text2_name + embed, - UTF16ToUTF8(string16(text))); + UTF16ToUTF8(base::string16(text))); text.Reset(); long hyperlink_count; @@ -566,7 +566,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); EXPECT_EQ(S_OK, hypertext->get_text(0, 3, text.Receive())); EXPECT_STREQ(button1_text_name.c_str(), - base::UTF16ToUTF8(string16(text)).c_str()); + base::UTF16ToUTF8(base::string16(text)).c_str()); text.Reset(); hyperlink.Release(); hypertext.Release(); @@ -576,7 +576,7 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); EXPECT_EQ(S_OK, hypertext->get_text(0, 4, text.Receive())); EXPECT_STREQ(link1_text_name.c_str(), - base::UTF16ToUTF8(string16(text)).c_str()); + base::UTF16ToUTF8(base::string16(text)).c_str()); text.Reset(); hyperlink.Release(); hypertext.Release(); diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 45bf951..3dd07d8 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc @@ -169,7 +169,7 @@ void DumpAccessibilityTreeTest::RunTest( } // Load the page. - string16 html_contents16; + base::string16 html_contents16; html_contents16 = UTF8ToUTF16(html_contents); GURL url = GetTestUrl("accessibility", html_file.BaseName().MaybeAsASCII().c_str()); @@ -191,7 +191,7 @@ void DumpAccessibilityTreeTest::RunTest( formatter.SetFilters(filters); // Perform a diff (or write the initial baseline). - string16 actual_contents_utf16; + base::string16 actual_contents_utf16; formatter.FormatAccessibilityTree(&actual_contents_utf16); std::string actual_contents = UTF16ToUTF8(actual_contents_utf16); std::vector<std::string> actual_lines, expected_lines; diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 2a53563..0f61633 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -389,7 +389,7 @@ void ContentViewCoreImpl::UpdateFrameInfo( overdraw_bottom_height); } -void ContentViewCoreImpl::SetTitle(const string16& title) { +void ContentViewCoreImpl::SetTitle(const base::string16& title) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); if (obj.is_null()) @@ -438,7 +438,7 @@ void ContentViewCoreImpl::ShowSelectPopupMenu( ScopedJavaLocalRef<jintArray> enabled_array(env, env->NewIntArray(items.size())); - std::vector<string16> labels; + std::vector<base::string16> labels; labels.reserve(items.size()); for (size_t i = 0; i < items.size(); ++i) { labels.push_back(items[i].label); @@ -1487,7 +1487,7 @@ void ContentViewCoreImpl::EvaluateJavaScript(JNIEnv* env, if (!callback) { // No callback requested. - rvh->ExecuteJavascriptInWebFrame(string16(), // frame_xpath + rvh->ExecuteJavascriptInWebFrame(base::string16(), // frame_xpath ConvertJavaStringToUTF16(env, script)); return; } @@ -1500,7 +1500,7 @@ void ContentViewCoreImpl::EvaluateJavaScript(JNIEnv* env, base::Bind(&JavaScriptResultCallback, j_callback); rvh->ExecuteJavascriptInWebFrameCallbackResult( - string16(), // frame_xpath + base::string16(), // frame_xpath ConvertJavaStringToUTF16(env, script), c_callback); } diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index 0c3a5ec..138aecc 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h @@ -258,7 +258,7 @@ class ContentViewCoreImpl : public ContentViewCore, int selection_start, int selection_end, int composition_start, int composition_end, bool show_ime_if_needed, bool require_ack); - void SetTitle(const string16& title); + void SetTitle(const base::string16& title); void OnBackgroundColorChanged(SkColor color); bool HasFocus(); diff --git a/content/browser/android/content_view_statics.cc b/content/browser/android/content_view_statics.cc index 917da58..e176564 100644 --- a/content/browser/android/content_view_statics.cc +++ b/content/browser/android/content_view_statics.cc @@ -62,8 +62,8 @@ void ResumeWebkitSharedTimers(const std::vector<int>& suspended_processes) { // Returns the first substring consisting of the address of a physical location. static jstring FindAddress(JNIEnv* env, jclass clazz, jstring addr) { - string16 content_16 = ConvertJavaStringToUTF16(env, addr); - string16 result_16; + base::string16 content_16 = ConvertJavaStringToUTF16(env, addr); + base::string16 result_16; if (content::address_parser::FindAddress(content_16, &result_16)) return ConvertUTF16ToJavaString(env, result_16).Release(); return NULL; diff --git a/content/browser/android/web_contents_observer_android.cc b/content/browser/android/web_contents_observer_android.cc index f2494e8..235041b 100644 --- a/content/browser/android/web_contents_observer_android.cc +++ b/content/browser/android/web_contents_observer_android.cc @@ -98,11 +98,11 @@ void WebContentsObserverAndroid::DidStopLoading( void WebContentsObserverAndroid::DidFailProvisionalLoad( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) { DidFailLoadInternal( true, is_main_frame, error_code, error_description, validated_url); @@ -113,7 +113,7 @@ void WebContentsObserverAndroid::DidFailLoad( const GURL& validated_url, bool is_main_frame, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) { DidFailLoadInternal( false, is_main_frame, error_code, error_description, validated_url); @@ -175,7 +175,7 @@ void WebContentsObserverAndroid::DidStartProvisionalLoadForFrame( void WebContentsObserverAndroid::DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, @@ -251,7 +251,7 @@ void WebContentsObserverAndroid::DidFailLoadInternal( bool is_provisional_load, bool is_main_frame, int error_code, - const string16& description, + const base::string16& description, const GURL& url) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); diff --git a/content/browser/android/web_contents_observer_android.h b/content/browser/android/web_contents_observer_android.h index 9742d28..15a1363 100644 --- a/content/browser/android/web_contents_observer_android.h +++ b/content/browser/android/web_contents_observer_android.h @@ -38,17 +38,17 @@ class WebContentsObserverAndroid : public WebContentsObserver { virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; virtual void DidFailProvisionalLoad( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) OVERRIDE; virtual void DidFailLoad(int64 frame_id, const GURL& validated_url, bool is_main_frame, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) OVERRIDE; virtual void DidNavigateMainFrame(const LoadCommittedDetails& details, const FrameNavigateParams& params) OVERRIDE; @@ -64,7 +64,7 @@ class WebContentsObserverAndroid : public WebContentsObserver { RenderViewHost* render_view_host) OVERRIDE; virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, @@ -83,7 +83,7 @@ class WebContentsObserverAndroid : public WebContentsObserver { void DidFailLoadInternal(bool is_provisional_load, bool is_main_frame, int error_code, - const string16& description, + const base::string16& description, const GURL& url); JavaObjectWeakGlobalRef weak_java_observer_; diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc index 8e6bde3..4261572 100644 --- a/content/browser/browser_child_process_host_impl.cc +++ b/content/browser/browser_child_process_host_impl.cc @@ -192,7 +192,7 @@ base::ProcessHandle BrowserChildProcessHostImpl::GetHandle() const { return child_process_->GetHandle(); } -void BrowserChildProcessHostImpl::SetName(const string16& name) { +void BrowserChildProcessHostImpl::SetName(const base::string16& name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); data_.name = name; } diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h index 6345595..428da3d 100644 --- a/content/browser/browser_child_process_host_impl.h +++ b/content/browser/browser_child_process_host_impl.h @@ -54,7 +54,7 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl virtual ChildProcessHost* GetHost() const OVERRIDE; virtual base::TerminationStatus GetTerminationStatus( bool known_dead, int* exit_code) OVERRIDE; - virtual void SetName(const string16& name) OVERRIDE; + virtual void SetName(const base::string16& name) OVERRIDE; virtual void SetHandle(base::ProcessHandle handle) OVERRIDE; // Returns the handle of the child process. This can be called only after diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index 7d166a6..6d28a5e 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc @@ -365,9 +365,9 @@ BrowserPluginGuest::BrowserPluginGuest( bool BrowserPluginGuest::AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { if (!delegate_) return false; @@ -796,7 +796,7 @@ WebContents* BrowserPluginGuest::OpenURLFromTab(WebContents* source, void BrowserPluginGuest::WebContentsCreated(WebContents* source_contents, int64 source_frame_id, - const string16& frame_name, + const base::string16& frame_name, const GURL& target_url, WebContents* new_contents) { WebContentsImpl* new_contents_impl = @@ -1028,7 +1028,7 @@ void BrowserPluginGuest::SendQueuedMessages() { void BrowserPluginGuest::DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, @@ -1045,7 +1045,7 @@ void BrowserPluginGuest::DidStopLoading(RenderViewHost* render_view_host) { const char script[] = "window.addEventListener('dragstart', function() { " " window.event.preventDefault(); " "});"; - render_view_host->ExecuteJavascriptInWebFrame(string16(), + render_view_host->ExecuteJavascriptInWebFrame(base::string16(), ASCIIToUTF16(script)); } } @@ -1633,8 +1633,8 @@ void BrowserPluginGuest::RunJavaScriptDialog( const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) { base::DictionaryValue request_info; @@ -1659,18 +1659,18 @@ void BrowserPluginGuest::RunJavaScriptDialog( void BrowserPluginGuest::RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) { // This is called if the guest has a beforeunload event handler. // This callback allows navigation to proceed. - callback.Run(true, string16()); + callback.Run(true, base::string16()); } bool BrowserPluginGuest::HandleJavaScriptDialog( WebContents* web_contents, bool accept, - const string16* prompt_override) { + const base::string16* prompt_override) { return false; } diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h index 2a9c36c..6b6bf34 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.h +++ b/content/browser/browser_plugin/browser_plugin_guest.h @@ -147,7 +147,7 @@ class CONTENT_EXPORT BrowserPluginGuest // WebContentsObserver implementation. virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, @@ -161,9 +161,9 @@ class CONTENT_EXPORT BrowserPluginGuest // WebContentsDelegate implementation. virtual bool AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; // If a new window is created with target="_blank" and rel="noreferrer", then // this method is called, indicating that the new WebContents is ready to be // attached. @@ -189,7 +189,7 @@ class CONTENT_EXPORT BrowserPluginGuest const OpenURLParams& params) OVERRIDE; virtual void WebContentsCreated(WebContents* source_contents, int64 source_frame_id, - const string16& frame_name, + const base::string16& frame_name, const GURL& target_url, WebContents* new_contents) OVERRIDE; virtual void RendererUnresponsive(WebContents* source) OVERRIDE; @@ -208,18 +208,19 @@ class CONTENT_EXPORT BrowserPluginGuest const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) OVERRIDE; virtual void RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) OVERRIDE; - virtual bool HandleJavaScriptDialog(WebContents* web_contents, - bool accept, - const string16* prompt_override) OVERRIDE; + virtual bool HandleJavaScriptDialog( + WebContents* web_contents, + bool accept, + const base::string16* prompt_override) OVERRIDE; virtual void CancelActiveAndPendingDialogs( WebContents* web_contents) OVERRIDE; virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc index 42c7486..cb10824 100644 --- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc +++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc @@ -453,11 +453,11 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, MAYBE_EmbedderSameAfterNav) { // does not happen and existing embedder doesn't change in web_contents. GURL test_url_new(embedded_test_server()->GetURL( "/browser_plugin_title_change.html")); - const string16 expected_title = ASCIIToUTF16("done"); + const base::string16 expected_title = ASCIIToUTF16("done"); content::TitleWatcher title_watcher(shell()->web_contents(), expected_title); NavigateToURL(shell(), test_url_new); VLOG(0) << "Start waiting for title"; - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); VLOG(0) << "Done navigating to second page"; @@ -536,26 +536,26 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, ReloadEmbedder) { // the page has successfully reloaded when it goes back to 'embedder' // in the next step. { - const string16 expected_title = ASCIIToUTF16("modified"); + const base::string16 expected_title = ASCIIToUTF16("modified"); content::TitleWatcher title_watcher(test_embedder()->web_contents(), expected_title); ExecuteSyncJSFunction(rvh, base::StringPrintf("SetTitle('%s');", "modified")); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); } // Reload the embedder page, and verify that the reload was successful. // Then navigate the guest to verify that the browser process does not crash. { - const string16 expected_title = ASCIIToUTF16("embedder"); + const base::string16 expected_title = ASCIIToUTF16("embedder"); content::TitleWatcher title_watcher(test_embedder()->web_contents(), expected_title); test_embedder()->web_contents()->GetController().Reload(false); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); ExecuteSyncJSFunction( @@ -618,7 +618,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, MAYBE_AcceptDragEvents) { // This should trigger appropriate messages from the embedder to the guest, // and end with a drop on the guest. The guest changes title when a drop // happens. - const string16 expected_title = ASCIIToUTF16("DROPPED"); + const base::string16 expected_title = ASCIIToUTF16("DROPPED"); content::TitleWatcher title_watcher(test_guest()->web_contents(), expected_title); @@ -628,7 +628,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, MAYBE_AcceptDragEvents) { blink::WebDragOperationEvery, 0); rvh->DragTargetDrop(gfx::Point(end_x, end_y), gfx::Point(end_x, end_y), 0); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); } @@ -650,7 +650,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, PostMessage) { RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( test_embedder()->web_contents()->GetRenderViewHost()); { - const string16 expected_title = ASCIIToUTF16("main guest"); + const base::string16 expected_title = ASCIIToUTF16("main guest"); content::TitleWatcher title_watcher(test_embedder()->web_contents(), expected_title); @@ -661,7 +661,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, PostMessage) { // The title will be updated to "main guest" at the last stage of the // process described above. - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); } } @@ -678,7 +678,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, DISABLED_PostMessageToIFrame) { RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( test_embedder()->web_contents()->GetRenderViewHost()); { - const string16 expected_title = ASCIIToUTF16("main guest"); + const base::string16 expected_title = ASCIIToUTF16("main guest"); content::TitleWatcher title_watcher(test_embedder()->web_contents(), expected_title); @@ -687,7 +687,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, DISABLED_PostMessageToIFrame) { // The title will be updated to "main guest" at the last stage of the // process described above. - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); } { @@ -703,7 +703,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, DISABLED_PostMessageToIFrame) { base::StringPrintf( "CreateChildFrame('%s');", test_url.spec().c_str())); - string16 actual_title = ready_watcher.WaitAndGetTitle(); + base::string16 actual_title = ready_watcher.WaitAndGetTitle(); EXPECT_EQ(ASCIIToUTF16("ready"), actual_title); content::TitleWatcher iframe_watcher(test_embedder()->web_contents(), diff --git a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc index dc2db35..59ae635 100644 --- a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc +++ b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.cc @@ -20,9 +20,9 @@ void TestBrowserPluginGuestDelegate::ResetStates() { void TestBrowserPluginGuestDelegate::AddMessageToConsole( int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { } void TestBrowserPluginGuestDelegate::Close() { diff --git a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.h b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.h index 910ff9f..4bfae4c 100644 --- a/content/browser/browser_plugin/test_browser_plugin_guest_delegate.h +++ b/content/browser/browser_plugin/test_browser_plugin_guest_delegate.h @@ -22,9 +22,9 @@ class TestBrowserPluginGuestDelegate : public BrowserPluginGuestDelegate { private: // Overridden from BrowserPluginGuestDelegate: virtual void AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; virtual void Close() OVERRIDE; virtual void GuestProcessGone(base::TerminationStatus status) OVERRIDE; virtual bool HandleKeyboardEvent( diff --git a/content/browser/devtools/renderer_overrides_handler.cc b/content/browser/devtools/renderer_overrides_handler.cc index cf3224d..28a09fc 100644 --- a/content/browser/devtools/renderer_overrides_handler.cc +++ b/content/browser/devtools/renderer_overrides_handler.cc @@ -293,8 +293,8 @@ RendererOverridesHandler::PageHandleJavaScriptDialog( bool accept; if (!params || !params->GetBoolean(paramAccept, &accept)) return command->InvalidParamResponse(paramAccept); - string16 prompt_override; - string16* prompt_override_ptr = &prompt_override; + base::string16 prompt_override; + base::string16* prompt_override_ptr = &prompt_override; if (!params || !params->GetString( devtools::Page::handleJavaScriptDialog::kParamPromptText, prompt_override_ptr)) { diff --git a/content/browser/devtools/worker_devtools_manager.cc b/content/browser/devtools/worker_devtools_manager.cc index f08523b..f060881 100644 --- a/content/browser/devtools/worker_devtools_manager.cc +++ b/content/browser/devtools/worker_devtools_manager.cc @@ -52,13 +52,15 @@ base::LazyInstance<AgentHosts>::Leaky g_orphan_map = LAZY_INSTANCE_INITIALIZER; } // namespace struct WorkerDevToolsManager::TerminatedInspectedWorker { - TerminatedInspectedWorker(WorkerId id, const GURL& url, const string16& name) + TerminatedInspectedWorker(WorkerId id, + const GURL& url, + const base::string16& name) : old_worker_id(id), worker_url(url), worker_name(name) {} WorkerId old_worker_id; GURL worker_url; - string16 worker_name; + base::string16 worker_name; }; @@ -202,7 +204,7 @@ class WorkerDevToolsManager::DetachedClientHosts { struct WorkerDevToolsManager::InspectedWorker { InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url, - const string16& name) + const base::string16& name) : host(host), route_id(route_id), worker_url(url), @@ -210,7 +212,7 @@ struct WorkerDevToolsManager::InspectedWorker { WorkerProcessHost* const host; int const route_id; GURL worker_url; - string16 worker_name; + base::string16 worker_name; }; // static diff --git a/content/browser/dom_storage/dom_storage_message_filter.cc b/content/browser/dom_storage/dom_storage_message_filter.cc index 3ab972c..fbc3880 100644 --- a/content/browser/dom_storage/dom_storage_message_filter.cc +++ b/content/browser/dom_storage/dom_storage_message_filter.cc @@ -116,8 +116,8 @@ void DOMStorageMessageFilter::OnLoadStorageArea(int connection_id, } void DOMStorageMessageFilter::OnSetItem( - int connection_id, const string16& key, - const string16& value, const GURL& page_url) { + int connection_id, const base::string16& key, + const base::string16& value, const GURL& page_url) { DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK_EQ(0, connection_dispatching_message_for_); base::AutoReset<int> auto_reset(&connection_dispatching_message_for_, @@ -129,20 +129,20 @@ void DOMStorageMessageFilter::OnSetItem( } void DOMStorageMessageFilter::OnLogGetItem( - int connection_id, const string16& key, + int connection_id, const base::string16& key, const base::NullableString16& value) { DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); host_->LogGetAreaItem(connection_id, key, value); } void DOMStorageMessageFilter::OnRemoveItem( - int connection_id, const string16& key, + int connection_id, const base::string16& key, const GURL& page_url) { DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK_EQ(0, connection_dispatching_message_for_); base::AutoReset<int> auto_reset(&connection_dispatching_message_for_, connection_id); - string16 not_used; + base::string16 not_used; host_->RemoveAreaItem(connection_id, key, page_url, ¬_used); Send(new DOMStorageMsg_AsyncOperationComplete(true)); } @@ -163,8 +163,8 @@ void DOMStorageMessageFilter::OnFlushMessages() { void DOMStorageMessageFilter::OnDOMStorageItemSet( const DOMStorageArea* area, - const string16& key, - const string16& new_value, + const base::string16& key, + const base::string16& new_value, const base::NullableString16& old_value, const GURL& page_url) { SendDOMStorageEvent(area, page_url, @@ -175,8 +175,8 @@ void DOMStorageMessageFilter::OnDOMStorageItemSet( void DOMStorageMessageFilter::OnDOMStorageItemRemoved( const DOMStorageArea* area, - const string16& key, - const string16& old_value, + const base::string16& key, + const base::string16& old_value, const GURL& page_url) { SendDOMStorageEvent(area, page_url, base::NullableString16(key, false), diff --git a/content/browser/dom_storage/dom_storage_message_filter.h b/content/browser/dom_storage/dom_storage_message_filter.h index a2670ef..3c82418 100644 --- a/content/browser/dom_storage/dom_storage_message_filter.h +++ b/content/browser/dom_storage/dom_storage_message_filter.h @@ -53,11 +53,11 @@ class DOMStorageMessageFilter void OnCloseStorageArea(int connection_id); void OnLoadStorageArea(int connection_id, DOMStorageValuesMap* map, bool* send_log_get_messages); - void OnSetItem(int connection_id, const string16& key, - const string16& value, const GURL& page_url); - void OnLogGetItem(int connection_id, const string16& key, + void OnSetItem(int connection_id, const base::string16& key, + const base::string16& value, const GURL& page_url); + void OnLogGetItem(int connection_id, const base::string16& key, const base::NullableString16& value); - void OnRemoveItem(int connection_id, const string16& key, + void OnRemoveItem(int connection_id, const base::string16& key, const GURL& page_url); void OnClear(int connection_id, const GURL& page_url); void OnFlushMessages(); @@ -66,14 +66,14 @@ class DOMStorageMessageFilter // sends events back to our renderer process. virtual void OnDOMStorageItemSet( const DOMStorageArea* area, - const string16& key, - const string16& new_value, + const base::string16& key, + const base::string16& new_value, const base::NullableString16& old_value, const GURL& page_url) OVERRIDE; virtual void OnDOMStorageItemRemoved( const DOMStorageArea* area, - const string16& key, - const string16& old_value, + const base::string16& key, + const base::string16& old_value, const GURL& page_url) OVERRIDE; virtual void OnDOMStorageAreaCleared( const DOMStorageArea* area, diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc index aecded1..3afc41a 100644 --- a/content/browser/download/download_manager_impl_unittest.cc +++ b/content/browser/download/download_manager_impl_unittest.cc @@ -120,7 +120,7 @@ class MockDownloadItemImpl : public DownloadItemImpl { MOCK_CONST_METHOD0(CurrentSpeed, int64()); MOCK_CONST_METHOD0(PercentComplete, int()); MOCK_CONST_METHOD0(AllDataSaved, bool()); - MOCK_CONST_METHOD1(MatchesQuery, bool(const string16& query)); + MOCK_CONST_METHOD1(MatchesQuery, bool(const base::string16& query)); MOCK_CONST_METHOD0(IsDone, bool()); MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&()); MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&()); diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc index 41bff06..0850c3b 100644 --- a/content/browser/download/drag_download_util.cc +++ b/content/browser/download/drag_download_util.cc @@ -23,18 +23,18 @@ using net::FileStream; namespace content { -bool ParseDownloadMetadata(const string16& metadata, - string16* mime_type, +bool ParseDownloadMetadata(const base::string16& metadata, + base::string16* mime_type, base::FilePath* file_name, GURL* url) { const char16 separator = L':'; size_t mime_type_end_pos = metadata.find(separator); - if (mime_type_end_pos == string16::npos) + if (mime_type_end_pos == base::string16::npos) return false; size_t file_name_end_pos = metadata.find(separator, mime_type_end_pos + 1); - if (file_name_end_pos == string16::npos) + if (file_name_end_pos == base::string16::npos) return false; GURL parsed_url = GURL(metadata.substr(file_name_end_pos + 1)); @@ -44,7 +44,7 @@ bool ParseDownloadMetadata(const string16& metadata, if (mime_type) *mime_type = metadata.substr(0, mime_type_end_pos); if (file_name) { - string16 file_name_str = metadata.substr( + base::string16 file_name_str = metadata.substr( mime_type_end_pos + 1, file_name_end_pos - mime_type_end_pos - 1); #if defined(OS_WIN) *file_name = base::FilePath(file_name_str); @@ -70,7 +70,7 @@ FileStream* CreateFileStreamForDrop(base::FilePath* file_path, new_file_path = *file_path; } else { #if defined(OS_WIN) - string16 suffix = ASCIIToUTF16("-") + base::IntToString16(seq); + base::string16 suffix = ASCIIToUTF16("-") + base::IntToString16(seq); #else std::string suffix = std::string("-") + base::IntToString(seq); #endif diff --git a/content/browser/download/drag_download_util.h b/content/browser/download/drag_download_util.h index 8b58f48..ca266efa 100644 --- a/content/browser/download/drag_download_util.h +++ b/content/browser/download/drag_download_util.h @@ -32,8 +32,8 @@ namespace content { // appropriately. // For example, we can have // text/plain:example.txt:http://example.com/example.txt -bool ParseDownloadMetadata(const string16& metadata, - string16* mime_type, +bool ParseDownloadMetadata(const base::string16& metadata, + base::string16* mime_type, base::FilePath* file_name, GURL* url); diff --git a/content/browser/download/save_package.h b/content/browser/download/save_package.h index 939002e..1ab429e 100644 --- a/content/browser/download/save_package.h +++ b/content/browser/download/save_package.h @@ -279,7 +279,7 @@ class CONTENT_EXPORT SavePackage base::FilePath saved_main_directory_path_; // The title of the page the user wants to save. - string16 title_; + base::string16 title_; // Used to calculate package download speed (in files per second). base::TimeTicks start_tick_; diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc index c0aa3f8..3045c42 100644 --- a/content/browser/download/save_package_unittest.cc +++ b/content/browser/download/save_package_unittest.cc @@ -346,7 +346,7 @@ TEST_F(SavePackageTest, MAYBE_TestEnsureMimeExtension) { static const struct SuggestedSaveNameTestCase { const char* page_url; - const string16 page_title; + const base::string16 page_title; const base::FilePath::CharType* expected_name; bool ensure_html_extension; } kSuggestedSaveNames[] = { diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc index 8b249e9..27cff1f 100644 --- a/content/browser/frame_host/interstitial_page_impl.cc +++ b/content/browser/frame_host/interstitial_page_impl.cc @@ -431,7 +431,7 @@ void InterstitialPageImpl::DidNavigate( void InterstitialPageImpl::UpdateTitle( RenderViewHost* render_view_host, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) { if (!enabled()) return; @@ -545,7 +545,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { int32 max_page_id = web_contents()-> GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance()); - render_view_host_->CreateRenderView(string16(), + render_view_host_->CreateRenderView(base::string16(), MSG_ROUTING_NONE, max_page_id); controller_->delegate()->RenderViewForInterstitialPageCreated( diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h index 47a127e..07695b2 100644 --- a/content/browser/frame_host/interstitial_page_impl.h +++ b/content/browser/frame_host/interstitial_page_impl.h @@ -112,7 +112,7 @@ class CONTENT_EXPORT InterstitialPageImpl const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; virtual void UpdateTitle(RenderViewHost* render_view_host, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) OVERRIDE; virtual RendererPreferences GetRendererPrefs( BrowserContext* browser_context) const OVERRIDE; @@ -246,7 +246,7 @@ class CONTENT_EXPORT InterstitialPageImpl // The original title of the contents that should be reverted to when the // interstitial is hidden. - string16 original_web_contents_title_; + base::string16 original_web_contents_title_; // Our RenderViewHostViewDelegate, necessary for accelerators to work. scoped_ptr<InterstitialPageRVHDelegateView> rvh_delegate_view_; diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc index 0c6f803..a49a932 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -163,7 +163,7 @@ NavigationEntry* NavigationController::CreateNavigationEntry( -1, loaded_url, referrer, - string16(), + base::string16(), transition, is_renderer_initiated); entry->SetVirtualURL(url); @@ -354,7 +354,7 @@ void NavigationControllerImpl::ReloadInternal(bool check_for_repost, // meanwhile, so we need to revert to the default title upon reload and // invalidate the previously cached title (SetTitle will do both). // See Chromium issue 96041. - pending_entry_->SetTitle(string16()); + pending_entry_->SetTitle(base::string16()); pending_entry_->SetTransitionType(PAGE_TRANSITION_RELOAD); } diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc index 1f31e11..30475ec 100644 --- a/content/browser/frame_host/navigation_controller_impl_unittest.cc +++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc @@ -921,7 +921,7 @@ TEST_F(NavigationControllerTest, LoadURL_AbortDoesntCancelPending) { params.frame_id = 1; params.is_main_frame = true; params.error_code = net::ERR_ABORTED; - params.error_description = string16(); + params.error_description = base::string16(); params.url = kNewURL; params.showing_repost_interstitial = false; test_rvh()->OnMessageReceived( @@ -999,7 +999,7 @@ TEST_F(NavigationControllerTest, LoadURL_RedirectAbortDoesntShowPendingURL) { params.frame_id = 1; params.is_main_frame = true; params.error_code = net::ERR_ABORTED; - params.error_description = string16(); + params.error_description = base::string16(); params.url = kRedirectURL; params.showing_repost_interstitial = false; test_rvh()->OnMessageReceived( @@ -2342,7 +2342,7 @@ TEST_F(NavigationControllerTest, RestoreNavigateAfterFailure) { fail_load_params.frame_id = 1; fail_load_params.is_main_frame = true; fail_load_params.error_code = net::ERR_ABORTED; - fail_load_params.error_description = string16(); + fail_load_params.error_description = base::string16(); fail_load_params.url = url; fail_load_params.showing_repost_interstitial = false; rvh->OnMessageReceived( @@ -2897,7 +2897,7 @@ TEST_F(NavigationControllerTest, CloneAndGoBack) { NavigationControllerImpl& controller = controller_impl(); const GURL url1("http://foo1"); const GURL url2("http://foo2"); - const string16 title(ASCIIToUTF16("Title")); + const base::string16 title(ASCIIToUTF16("Title")); NavigateAndCommit(url1); controller.GetVisibleEntry()->SetTitle(title); @@ -2922,7 +2922,7 @@ TEST_F(NavigationControllerTest, CloneAndReload) { NavigationControllerImpl& controller = controller_impl(); const GURL url1("http://foo1"); const GURL url2("http://foo2"); - const string16 title(ASCIIToUTF16("Title")); + const base::string16 title(ASCIIToUTF16("Title")); NavigateAndCommit(url1); controller.GetVisibleEntry()->SetTitle(title); diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc index a9b37cc..d5d6fc2 100644 --- a/content/browser/frame_host/navigation_entry_impl.cc +++ b/content/browser/frame_host/navigation_entry_impl.cc @@ -60,7 +60,7 @@ NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, int page_id, const GURL& url, const Referrer& referrer, - const string16& title, + const base::string16& title, PageTransition transition_type, bool is_renderer_initiated) : unique_id_(GetUniqueIDInConstructor()), @@ -130,12 +130,12 @@ const GURL& NavigationEntryImpl::GetVirtualURL() const { return virtual_url_.is_empty() ? url_ : virtual_url_; } -void NavigationEntryImpl::SetTitle(const string16& title) { +void NavigationEntryImpl::SetTitle(const base::string16& title) { title_ = title; cached_display_title_.clear(); } -const string16& NavigationEntryImpl::GetTitle() const { +const base::string16& NavigationEntryImpl::GetTitle() const { return title_; } @@ -166,7 +166,7 @@ void NavigationEntryImpl::SetBindings(int bindings) { bindings_ = bindings; } -const string16& NavigationEntryImpl::GetTitleForDisplay( +const base::string16& NavigationEntryImpl::GetTitleForDisplay( const std::string& languages) const { // Most pages have real titles. Don't even bother caching anything if this is // the case. @@ -179,7 +179,7 @@ const string16& NavigationEntryImpl::GetTitleForDisplay( return cached_display_title_; // Use the virtual URL first if any, and fall back on using the real URL. - string16 title; + base::string16 title; if (!virtual_url_.is_empty()) { title = net::FormatUrl(virtual_url_, languages); } else if (!url_.is_empty()) { @@ -188,8 +188,8 @@ const string16& NavigationEntryImpl::GetTitleForDisplay( // For file:// URLs use the filename as the title, not the full path. if (url_.SchemeIsFile()) { - string16::size_type slashpos = title.rfind('/'); - if (slashpos != string16::npos) + base::string16::size_type slashpos = title.rfind('/'); + if (slashpos != base::string16::npos) title = title.substr(slashpos + 1); } @@ -306,13 +306,14 @@ const std::string& NavigationEntryImpl::GetFrameToNavigate() const { } void NavigationEntryImpl::SetExtraData(const std::string& key, - const string16& data) { + const base::string16& data) { extra_data_[key] = data; } bool NavigationEntryImpl::GetExtraData(const std::string& key, - string16* data) const { - std::map<std::string, string16>::const_iterator iter = extra_data_.find(key); + base::string16* data) const { + std::map<std::string, base::string16>::const_iterator iter = + extra_data_.find(key); if (iter == extra_data_.end()) return false; *data = iter->second; diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h index c7f4f5f..8a51888 100644 --- a/content/browser/frame_host/navigation_entry_impl.h +++ b/content/browser/frame_host/navigation_entry_impl.h @@ -29,7 +29,7 @@ class CONTENT_EXPORT NavigationEntryImpl int page_id, const GURL& url, const Referrer& referrer, - const string16& title, + const base::string16& title, PageTransition transition_type, bool is_renderer_initiated); virtual ~NavigationEntryImpl(); @@ -45,13 +45,13 @@ class CONTENT_EXPORT NavigationEntryImpl virtual const Referrer& GetReferrer() const OVERRIDE; virtual void SetVirtualURL(const GURL& url) OVERRIDE; virtual const GURL& GetVirtualURL() const OVERRIDE; - virtual void SetTitle(const string16& title) OVERRIDE; - virtual const string16& GetTitle() const OVERRIDE; + virtual void SetTitle(const base::string16& title) OVERRIDE; + virtual const base::string16& GetTitle() const OVERRIDE; virtual void SetPageState(const PageState& state) OVERRIDE; virtual const PageState& GetPageState() const OVERRIDE; virtual void SetPageID(int page_id) OVERRIDE; virtual int32 GetPageID() const OVERRIDE; - virtual const string16& GetTitleForDisplay( + virtual const base::string16& GetTitleForDisplay( const std::string& languages) const OVERRIDE; virtual bool IsViewSourceMode() const OVERRIDE; virtual void SetTransitionType(PageTransition transition_type) OVERRIDE; @@ -80,9 +80,9 @@ class CONTENT_EXPORT NavigationEntryImpl virtual void SetFrameToNavigate(const std::string& frame_name) OVERRIDE; virtual const std::string& GetFrameToNavigate() const OVERRIDE; virtual void SetExtraData(const std::string& key, - const string16& data) OVERRIDE; + const base::string16& data) OVERRIDE; virtual bool GetExtraData(const std::string& key, - string16* data) const OVERRIDE; + base::string16* data) const OVERRIDE; virtual void ClearExtraData(const std::string& key) OVERRIDE; virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; virtual int GetHttpStatusCode() const OVERRIDE; @@ -243,7 +243,7 @@ class CONTENT_EXPORT NavigationEntryImpl Referrer referrer_; GURL virtual_url_; bool update_virtual_url_with_url_; - string16 title_; + base::string16 title_; FaviconStatus favicon_; PageState page_state_; int32 page_id_; @@ -290,7 +290,7 @@ class CONTENT_EXPORT NavigationEntryImpl // us from having to do URL formatting on the URL every time the title is // displayed. When the URL, virtual URL, or title is set, this should be // cleared to force a refresh. - mutable string16 cached_display_title_; + mutable base::string16 cached_display_title_; // In case a navigation is transferred to a new RVH but the request has // been generated in the renderer already, this identifies the old request so @@ -342,7 +342,7 @@ class CONTENT_EXPORT NavigationEntryImpl // Used to store extra data to support browser features. This member is not // persisted, unless specific data is taken out/put back in at save/restore // time (see TabNavigation for an example of this). - std::map<std::string, string16> extra_data_; + std::map<std::string, base::string16> extra_data_; // Copy and assignment is explicitly allowed for this class. }; diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc index cb742e4..488106f 100644 --- a/content/browser/frame_host/navigation_entry_impl_unittest.cc +++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc @@ -136,7 +136,7 @@ TEST_F(NavigationEntryTest, NavigationEntryAccessors) { EXPECT_EQ(GURL("from2"), entry2_->GetReferrer().url); // Title - EXPECT_EQ(string16(), entry1_->GetTitle()); + EXPECT_EQ(base::string16(), entry1_->GetTitle()); EXPECT_EQ(ASCIIToUTF16("title"), entry2_->GetTitle()); entry2_->SetTitle(ASCIIToUTF16("title2")); EXPECT_EQ(ASCIIToUTF16("title2"), entry2_->GetTitle()); @@ -219,8 +219,8 @@ TEST_F(NavigationEntryTest, NavigationEntryTimestamps) { // Test extra data stored in the navigation entry. TEST_F(NavigationEntryTest, NavigationEntryExtraData) { - string16 test_data = ASCIIToUTF16("my search terms"); - string16 output; + base::string16 test_data = ASCIIToUTF16("my search terms"); + base::string16 output; entry1_->SetExtraData("search_terms", test_data); EXPECT_FALSE(entry1_->GetExtraData("non_existent_key", &output)); @@ -233,7 +233,7 @@ TEST_F(NavigationEntryTest, NavigationEntryExtraData) { EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output)); EXPECT_EQ(test_data, output); // Using an empty string shows that the data is not present in the map. - string16 output2; + base::string16 output2; EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2)); EXPECT_EQ(ASCIIToUTF16(""), output2); } diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc index 9a4b004..69d977b 100644 --- a/content/browser/frame_host/render_frame_host_manager_unittest.cc +++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc @@ -260,7 +260,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) { contents()->GetRenderManagerForTesting()->current_host()); // Send an update title message and make sure it works. - const string16 ntp_title = ASCIIToUTF16("NTP Title"); + const base::string16 ntp_title = ASCIIToUTF16("NTP Title"); blink::WebTextDirection direction = blink::WebTextDirectionLeftToRight; EXPECT_TRUE(ntp_rvh->OnMessageReceived( ViewHostMsg_UpdateTitle(rvh()->GetRoutingID(), 0, ntp_title, direction))); @@ -288,7 +288,7 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) { dest_rvh->SendNavigate(101, kDestUrl); // The new RVH should be able to update its title. - const string16 dest_title = ASCIIToUTF16("Google"); + const base::string16 dest_title = ASCIIToUTF16("Google"); EXPECT_TRUE(dest_rvh->OnMessageReceived( ViewHostMsg_UpdateTitle(rvh()->GetRoutingID(), 101, dest_title, direction))); @@ -308,9 +308,9 @@ TEST_F(RenderFrameHostManagerTest, FilterMessagesWhileSwappedOut) { MockRenderProcessHost* ntp_process_host = static_cast<MockRenderProcessHost*>(ntp_rvh->GetProcess()); ntp_process_host->sink().ClearMessages(); - const string16 msg = ASCIIToUTF16("Message"); + const base::string16 msg = ASCIIToUTF16("Message"); bool result = false; - string16 unused; + base::string16 unused; ViewHostMsg_RunBeforeUnloadConfirm before_unload_msg( rvh()->GetRoutingID(), kChromeURL, msg, false, &result, &unused); // Enable pumping for check in BrowserMessageFilter::CheckCanDispatchOnUI. @@ -604,7 +604,7 @@ TEST_F(RenderFrameHostManagerTest, Navigate) { const GURL kUrl1("http://www.google.com/"); NavigationEntryImpl entry1( NULL /* instance */, -1 /* page_id */, kUrl1, Referrer(), - string16() /* title */, PAGE_TRANSITION_TYPED, + base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); host = manager.Navigate(entry1); @@ -626,7 +626,7 @@ TEST_F(RenderFrameHostManagerTest, Navigate) { NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(kUrl1, blink::WebReferrerPolicyDefault), - string16() /* title */, PAGE_TRANSITION_LINK, + base::string16() /* title */, PAGE_TRANSITION_LINK, true /* is_renderer_init */); host = manager.Navigate(entry2); @@ -646,7 +646,7 @@ TEST_F(RenderFrameHostManagerTest, Navigate) { NavigationEntryImpl entry3( NULL /* instance */, -1 /* page_id */, kUrl3, Referrer(kUrl2, blink::WebReferrerPolicyDefault), - string16() /* title */, PAGE_TRANSITION_LINK, + base::string16() /* title */, PAGE_TRANSITION_LINK, false /* is_renderer_init */); host = manager.Navigate(entry3); @@ -693,7 +693,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyReNavigation) { // 1) The first navigation. -------------------------- const GURL kUrl1("http://www.google.com/"); NavigationEntryImpl entry1(NULL /* instance */, -1 /* page_id */, kUrl1, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHost* host = manager.Navigate(entry1); @@ -721,7 +721,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyReNavigation) { const GURL kUrl2("http://www.example.com"); NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(), - string16() /* title */, PAGE_TRANSITION_TYPED, + base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHostImpl* host2 = static_cast<RenderViewHostImpl*>( manager.Navigate(entry2)); @@ -772,7 +772,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyReNavigation) { // 3) Cross-site navigate to next site before 2) has committed. -------------- const GURL kUrl3("http://webkit.org/"); NavigationEntryImpl entry3(NULL /* instance */, -1 /* page_id */, kUrl3, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); test_process_host->sink().ClearMessages(); @@ -836,7 +836,7 @@ TEST_F(RenderFrameHostManagerTest, WebUI) { const GURL kUrl("chrome://foo"); NavigationEntryImpl entry(NULL /* instance */, -1 /* page_id */, kUrl, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHost* host = manager.Navigate(entry); @@ -880,12 +880,12 @@ TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) { manager1.Init( browser_context(), blank_instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE); // Test the case that new RVH is considered live. - manager1.current_host()->CreateRenderView(string16(), -1, -1); + manager1.current_host()->CreateRenderView(base::string16(), -1, -1); // Navigate to a WebUI page. const GURL kUrl1("chrome://foo"); NavigationEntryImpl entry1(NULL /* instance */, -1 /* page_id */, kUrl1, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHost* host1 = manager1.Navigate(entry1); @@ -911,11 +911,11 @@ TEST_F(RenderFrameHostManagerTest, WebUIInNewTab) { browser_context(), webui_instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE); // Make sure the new RVH is considered live. This is usually done in // RenderWidgetHost::Init when opening a new tab from a link. - manager2.current_host()->CreateRenderView(string16(), -1, -1); + manager2.current_host()->CreateRenderView(base::string16(), -1, -1); const GURL kUrl2("chrome://foo/bar"); NavigationEntryImpl entry2(NULL /* instance */, -1 /* page_id */, kUrl2, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_LINK, true /* is_renderer_init */); RenderViewHost* host2 = manager2.Navigate(entry2); @@ -1107,7 +1107,7 @@ TEST_F(RenderFrameHostManagerTest, CleanUpSwappedOutRVHOnProcessCrash) { contents()->SetOpener(opener1.get()); // Make sure the new opener RVH is considered live. - opener1_manager->current_host()->CreateRenderView(string16(), -1, -1); + opener1_manager->current_host()->CreateRenderView(base::string16(), -1, -1); // Use a cross-process navigation in the opener to swap out the old RVH. EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost( @@ -1202,7 +1202,7 @@ TEST_F(RenderFrameHostManagerTest, NoSwapOnGuestNavigations) { const GURL kUrl1("http://www.google.com/"); NavigationEntryImpl entry1( NULL /* instance */, -1 /* page_id */, kUrl1, Referrer(), - string16() /* title */, PAGE_TRANSITION_TYPED, + base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); host = manager.Navigate(entry1); @@ -1225,7 +1225,7 @@ TEST_F(RenderFrameHostManagerTest, NoSwapOnGuestNavigations) { NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(kUrl1, blink::WebReferrerPolicyDefault), - string16() /* title */, PAGE_TRANSITION_LINK, + base::string16() /* title */, PAGE_TRANSITION_LINK, true /* is_renderer_init */); host = manager.Navigate(entry2); @@ -1264,7 +1264,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyClose) { // 1) The first navigation. -------------------------- const GURL kUrl1("http://www.google.com/"); NavigationEntryImpl entry1(NULL /* instance */, -1 /* page_id */, kUrl1, - Referrer(), string16() /* title */, + Referrer(), base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHost* host = manager.Navigate(entry1); @@ -1291,7 +1291,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyClose) { const GURL kUrl2("http://www.example.com"); NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(), - string16() /* title */, PAGE_TRANSITION_TYPED, + base::string16() /* title */, PAGE_TRANSITION_TYPED, false /* is_renderer_init */); RenderViewHostImpl* host2 = static_cast<RenderViewHostImpl*>( manager.Navigate(entry2)); diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc index ba048ae..148ec49 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc @@ -187,7 +187,7 @@ void GamepadPlatformDataFetcherLinux::RefreshDevice(udev_device* dev) { vendor_id, product_id); TruncateUTF8ToByteSize(id, WebGamepad::idLengthCap - 1, &id); - string16 tmp16 = UTF8ToUTF16(id); + base::string16 tmp16 = UTF8ToUTF16(id); memset(pad.id, 0, sizeof(pad.id)); tmp16.copy(pad.id, arraysize(pad.id) - 1); diff --git a/content/browser/geolocation/fake_access_token_store.cc b/content/browser/geolocation/fake_access_token_store.cc index 9f9f61b..0e5fe40 100644 --- a/content/browser/geolocation/fake_access_token_store.cc +++ b/content/browser/geolocation/fake_access_token_store.cc @@ -45,7 +45,7 @@ void FakeAccessTokenStore::DefaultLoadAccessTokens( } void FakeAccessTokenStore::DefaultSaveAccessToken( - const GURL& server_url, const string16& access_token) { + const GURL& server_url, const base::string16& access_token) { DCHECK(server_url.is_valid()); access_token_set_[server_url] = access_token; } diff --git a/content/browser/geolocation/fake_access_token_store.h b/content/browser/geolocation/fake_access_token_store.h index 4d0867b..30a0185 100644 --- a/content/browser/geolocation/fake_access_token_store.h +++ b/content/browser/geolocation/fake_access_token_store.h @@ -23,12 +23,13 @@ class FakeAccessTokenStore : public AccessTokenStore { MOCK_METHOD1(LoadAccessTokens, void(const LoadAccessTokensCallbackType& callback)); MOCK_METHOD2(SaveAccessToken, - void(const GURL& server_url, const string16& access_token)); + void(const GURL& server_url, + const base::string16& access_token)); void DefaultLoadAccessTokens(const LoadAccessTokensCallbackType& callback); void DefaultSaveAccessToken(const GURL& server_url, - const string16& access_token); + const base::string16& access_token); AccessTokenSet access_token_set_; LoadAccessTokensCallbackType callback_; diff --git a/content/browser/geolocation/location_arbitrator_impl.cc b/content/browser/geolocation/location_arbitrator_impl.cc index 37c34ee..b8ed8c4 100644 --- a/content/browser/geolocation/location_arbitrator_impl.cc +++ b/content/browser/geolocation/location_arbitrator_impl.cc @@ -149,7 +149,7 @@ LocationProvider* LocationArbitratorImpl::NewNetworkLocationProvider( AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token) { + const base::string16& access_token) { #if defined(OS_ANDROID) // Android uses its own SystemLocationProvider. return NULL; diff --git a/content/browser/geolocation/location_arbitrator_impl.h b/content/browser/geolocation/location_arbitrator_impl.h index 45910552..e756f5e 100644 --- a/content/browser/geolocation/location_arbitrator_impl.h +++ b/content/browser/geolocation/location_arbitrator_impl.h @@ -57,7 +57,7 @@ class CONTENT_EXPORT LocationArbitratorImpl : public LocationArbitrator { AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token); + const base::string16& access_token); virtual LocationProvider* NewSystemLocationProvider(); virtual base::Time GetTimeNow() const; diff --git a/content/browser/geolocation/location_arbitrator_impl_unittest.cc b/content/browser/geolocation/location_arbitrator_impl_unittest.cc index 02df431..81df7a4 100644 --- a/content/browser/geolocation/location_arbitrator_impl_unittest.cc +++ b/content/browser/geolocation/location_arbitrator_impl_unittest.cc @@ -85,7 +85,7 @@ class TestingLocationArbitrator : public LocationArbitratorImpl { AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token) OVERRIDE { + const base::string16& access_token) OVERRIDE { return new MockLocationProvider(&cell_); } diff --git a/content/browser/geolocation/network_location_provider.cc b/content/browser/geolocation/network_location_provider.cc index 678edb2..efc68a7 100644 --- a/content/browser/geolocation/network_location_provider.cc +++ b/content/browser/geolocation/network_location_provider.cc @@ -27,7 +27,7 @@ bool NetworkLocationProvider::PositionCache::CachePosition( const WifiData& wifi_data, const Geoposition& position) { // Check that we can generate a valid key for the wifi data. - string16 key; + base::string16 key; if (!MakeKey(wifi_data, &key)) { return false; } @@ -57,7 +57,7 @@ bool NetworkLocationProvider::PositionCache::CachePosition( // the cached position if available, NULL otherwise. const Geoposition* NetworkLocationProvider::PositionCache::FindPosition( const WifiData& wifi_data) { - string16 key; + base::string16 key; if (!MakeKey(wifi_data, &key)) { return NULL; } @@ -71,13 +71,13 @@ const Geoposition* NetworkLocationProvider::PositionCache::FindPosition( // static bool NetworkLocationProvider::PositionCache::MakeKey( const WifiData& wifi_data, - string16* key) { + base::string16* key) { // Currently we use only WiFi data and base the key only on the MAC addresses. DCHECK(key); key->clear(); const size_t kCharsPerMacAddress = 6 * 3 + 1; // e.g. "11:22:33:44:55:66|" key->reserve(wifi_data.access_point_data.size() * kCharsPerMacAddress); - const string16 separator(ASCIIToUTF16("|")); + const base::string16 separator(ASCIIToUTF16("|")); for (WifiData::AccessPointDataSet::const_iterator iter = wifi_data.access_point_data.begin(); iter != wifi_data.access_point_data.end(); @@ -96,7 +96,7 @@ LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token) { + const base::string16& access_token) { return new NetworkLocationProvider( access_token_store, context, url, access_token); } @@ -106,7 +106,7 @@ NetworkLocationProvider::NetworkLocationProvider( AccessTokenStore* access_token_store, net::URLRequestContextGetter* url_context_getter, const GURL& url, - const string16& access_token) + const base::string16& access_token) : access_token_store_(access_token_store), wifi_data_provider_(NULL), wifi_data_update_callback_( @@ -163,7 +163,7 @@ void NetworkLocationProvider::WifiDataUpdateAvailable( void NetworkLocationProvider::LocationResponseAvailable( const Geoposition& position, bool server_error, - const string16& access_token, + const base::string16& access_token, const WifiData& wifi_data) { DCHECK(CalledOnValidThread()); // Record the position and update our cache. diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h index d5f3e99..710fd3f 100644 --- a/content/browser/geolocation/network_location_provider.h +++ b/content/browser/geolocation/network_location_provider.h @@ -54,12 +54,12 @@ class NetworkLocationProvider // Makes the key for the map of cached positions, using a set of // data. Returns true if a good key was generated, false otherwise. static bool MakeKey(const WifiData& wifi_data, - string16* key); + base::string16* key); // The cache of positions. This is stored as a map keyed on a string that // represents a set of data, and a list to provide // least-recently-added eviction. - typedef std::map<string16, Geoposition> CacheMap; + typedef std::map<base::string16, Geoposition> CacheMap; CacheMap cache_; typedef std::list<CacheMap::iterator> CacheAgeList; CacheAgeList cache_age_list_; // Oldest first. @@ -68,7 +68,7 @@ class NetworkLocationProvider NetworkLocationProvider(AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token); + const base::string16& access_token); virtual ~NetworkLocationProvider(); // LocationProvider implementation @@ -92,7 +92,7 @@ class NetworkLocationProvider void LocationResponseAvailable(const Geoposition& position, bool server_error, - const string16& access_token, + const base::string16& access_token, const WifiData& wifi_data); scoped_refptr<AccessTokenStore> access_token_store_; @@ -111,7 +111,7 @@ class NetworkLocationProvider // Cached value loaded from the token store or set by a previous server // response, and sent in each subsequent network request. - string16 access_token_; + base::string16 access_token_; // The current best position estimate. Geoposition position_; @@ -138,7 +138,7 @@ CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, - const string16& access_token); + const base::string16& access_token); } // namespace content diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc index 2e269b3..3ed7092 100644 --- a/content/browser/geolocation/network_location_request.cc +++ b/content/browser/geolocation/network_location_request.cc @@ -72,7 +72,7 @@ GURL FormRequestURL(const GURL& url); void FormUploadData(const WifiData& wifi_data, const base::Time& timestamp, - const string16& access_token, + const base::string16& access_token, std::string* upload_data); // Attempts to extract a position from the response. Detects and indicates @@ -83,7 +83,7 @@ void GetLocationFromResponse(bool http_post_result, const base::Time& timestamp, const GURL& server_url, Geoposition* position, - string16* access_token); + base::string16* access_token); // Parses the server response body. Returns true if parsing was successful. // Sets |*position| to the parsed location if a valid fix was received, @@ -91,7 +91,7 @@ void GetLocationFromResponse(bool http_post_result, bool ParseServerResponse(const std::string& response_body, const base::Time& timestamp, Geoposition* position, - string16* access_token); + base::string16* access_token); void AddWifiData(const WifiData& wifi_data, int age_milliseconds, base::DictionaryValue* request); @@ -111,7 +111,7 @@ NetworkLocationRequest::NetworkLocationRequest( NetworkLocationRequest::~NetworkLocationRequest() { } -bool NetworkLocationRequest::MakeRequest(const string16& access_token, +bool NetworkLocationRequest::MakeRequest(const base::string16& access_token, const WifiData& wifi_data, const base::Time& timestamp) { RecordUmaEvent(NETWORK_LOCATION_REQUEST_EVENT_REQUEST_START); @@ -150,7 +150,7 @@ void NetworkLocationRequest::OnURLFetchComplete( RecordUmaResponseCode(response_code); Geoposition position; - string16 access_token; + base::string16 access_token; std::string data; source->GetResponseAsString(&data); GetLocationFromResponse(status.is_success(), @@ -207,7 +207,7 @@ GURL FormRequestURL(const GURL& url) { void FormUploadData(const WifiData& wifi_data, const base::Time& timestamp, - const string16& access_token, + const base::string16& access_token, std::string* upload_data) { int age = kint32min; // Invalid so AddInteger() will ignore. if (!timestamp.is_null()) { @@ -291,7 +291,7 @@ void GetLocationFromResponse(bool http_post_result, const base::Time& timestamp, const GURL& server_url, Geoposition* position, - string16* access_token) { + base::string16* access_token) { DCHECK(position); DCHECK(access_token); @@ -351,7 +351,7 @@ bool GetAsDouble(const base::DictionaryValue& object, bool ParseServerResponse(const std::string& response_body, const base::Time& timestamp, Geoposition* position, - string16* access_token) { + base::string16* access_token) { DCHECK(position); DCHECK(!position->Validate()); DCHECK(position->error_code == Geoposition::ERROR_CODE_NONE); diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h index 38aaf3e..6fea08b 100644 --- a/content/browser/geolocation/network_location_request.h +++ b/content/browser/geolocation/network_location_request.h @@ -33,7 +33,7 @@ class NetworkLocationRequest : private net::URLFetcherDelegate { // server or network error - either no response or a 500 error code. typedef base::Callback<void(const Geoposition& /* position */, bool /* server_error */, - const string16& /* access_token */, + const base::string16& /* access_token */, const WifiData& /* wifi_data */)> LocationResponseCallback; @@ -45,7 +45,7 @@ class NetworkLocationRequest : private net::URLFetcherDelegate { // Makes a new request. Returns true if the new request was successfully // started. In all cases, any currently pending request will be canceled. - bool MakeRequest(const string16& access_token, + bool MakeRequest(const base::string16& access_token, const WifiData& wifi_data, const base::Time& timestamp); diff --git a/content/browser/geolocation/wifi_data.h b/content/browser/geolocation/wifi_data.h index a24e42e..72bc306 100644 --- a/content/browser/geolocation/wifi_data.h +++ b/content/browser/geolocation/wifi_data.h @@ -19,11 +19,11 @@ struct CONTENT_EXPORT AccessPointData { ~AccessPointData(); // MAC address, formatted as per MacAddressAsString16. - string16 mac_address; + base::string16 mac_address; int radio_signal_strength; // Measured in dBm int channel; int signal_to_noise; // Ratio in dB - string16 ssid; // Network identifier + base::string16 ssid; // Network identifier }; // This is to allow AccessPointData to be used in std::set. We order diff --git a/content/browser/geolocation/wifi_data_provider_common.cc b/content/browser/geolocation/wifi_data_provider_common.cc index 31f969c..9c2cbae 100644 --- a/content/browser/geolocation/wifi_data_provider_common.cc +++ b/content/browser/geolocation/wifi_data_provider_common.cc @@ -10,7 +10,7 @@ namespace content { -string16 MacAddressAsString16(const uint8 mac_as_int[6]) { +base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) { // mac_as_int is big-endian. Write in byte chunks. // Format is XX-XX-XX-XX-XX-XX. static const char* const kMacFormatString = diff --git a/content/browser/geolocation/wifi_data_provider_common.h b/content/browser/geolocation/wifi_data_provider_common.h index c42b4c2..befdb69 100644 --- a/content/browser/geolocation/wifi_data_provider_common.h +++ b/content/browser/geolocation/wifi_data_provider_common.h @@ -18,7 +18,7 @@ namespace content { // Converts a MAC address stored as an array of uint8 to a string. -string16 MacAddressAsString16(const uint8 mac_as_int[6]); +base::string16 MacAddressAsString16(const uint8 mac_as_int[6]); // Base class to promote code sharing between platform specific wifi data // providers. It's optional for specific platforms to derive this, but if they diff --git a/content/browser/geolocation/wifi_data_provider_win.cc b/content/browser/geolocation/wifi_data_provider_win.cc index 8efb191..ed69865 100644 --- a/content/browser/geolocation/wifi_data_provider_win.cc +++ b/content/browser/geolocation/wifi_data_provider_win.cc @@ -127,15 +127,15 @@ class WindowsNdisApi : public WifiDataProviderCommon::WlanApiInterface { private: static bool GetInterfacesNDIS( - std::vector<string16>* interface_service_names_out); + std::vector<base::string16>* interface_service_names_out); // Swaps in content of the vector passed - explicit WindowsNdisApi(std::vector<string16>* interface_service_names); + explicit WindowsNdisApi(std::vector<base::string16>* interface_service_names); bool GetInterfaceDataNDIS(HANDLE adapter_handle, WifiData::AccessPointDataSet* data); // NDIS variables. - std::vector<string16> interface_service_names_; + std::vector<base::string16> interface_service_names_; // Remembers scan result buffer size across calls. int oid_buffer_size_; @@ -144,9 +144,9 @@ class WindowsNdisApi : public WifiDataProviderCommon::WlanApiInterface { // Extracts data for an access point and converts to Gears format. bool GetNetworkData(const WLAN_BSS_ENTRY& bss_entry, AccessPointData* access_point_data); -bool UndefineDosDevice(const string16& device_name); -bool DefineDosDeviceIfNotExists(const string16& device_name); -HANDLE GetFileHandle(const string16& device_name); +bool UndefineDosDevice(const base::string16& device_name); +bool DefineDosDeviceIfNotExists(const base::string16& device_name); +HANDLE GetFileHandle(const base::string16& device_name); // Makes the OID query and returns a Win32 error code. int PerformQuery(HANDLE adapter_handle, BYTE* buffer, @@ -155,7 +155,7 @@ int PerformQuery(HANDLE adapter_handle, bool ResizeBuffer(int requested_size, scoped_ptr_malloc<BYTE>* buffer); // Gets the system directory and appends a trailing slash if not already // present. -bool GetSystemDirectory(string16* path); +bool GetSystemDirectory(base::string16* path); } // namespace WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { @@ -202,12 +202,12 @@ WindowsWlanApi* WindowsWlanApi::Create() { if (base::win::GetVersion() < base::win::VERSION_VISTA) return NULL; // We use an absolute path to load the DLL to avoid DLL preloading attacks. - string16 system_directory; + base::string16 system_directory; if (!GetSystemDirectory(&system_directory)) { return NULL; } DCHECK(!system_directory.empty()); - string16 dll_path = system_directory + L"wlanapi.dll"; + base::string16 dll_path = system_directory + L"wlanapi.dll"; HINSTANCE library = LoadLibraryEx(dll_path.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); @@ -359,7 +359,7 @@ int WindowsWlanApi::GetInterfaceDataWLAN( // WindowsNdisApi WindowsNdisApi::WindowsNdisApi( - std::vector<string16>* interface_service_names) + std::vector<base::string16>* interface_service_names) : oid_buffer_size_(kInitialBufferSize) { DCHECK(!interface_service_names->empty()); interface_service_names_.swap(*interface_service_names); @@ -369,7 +369,7 @@ WindowsNdisApi::~WindowsNdisApi() { } WindowsNdisApi* WindowsNdisApi::Create() { - std::vector<string16> interface_service_names; + std::vector<base::string16> interface_service_names; if (GetInterfacesNDIS(&interface_service_names)) { return new WindowsNdisApi(&interface_service_names); } @@ -412,7 +412,7 @@ bool WindowsNdisApi::GetAccessPointData(WifiData::AccessPointDataSet* data) { } bool WindowsNdisApi::GetInterfacesNDIS( - std::vector<string16>* interface_service_names_out) { + std::vector<base::string16>* interface_service_names_out) { HKEY network_cards_key = NULL; if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, @@ -530,18 +530,18 @@ bool GetNetworkData(const WLAN_BSS_ENTRY& bss_entry, return true; } -bool UndefineDosDevice(const string16& device_name) { +bool UndefineDosDevice(const base::string16& device_name) { // We remove only the mapping we use, that is \Device\<device_name>. - string16 target_path = L"\\Device\\" + device_name; + base::string16 target_path = L"\\Device\\" + device_name; return DefineDosDevice( DDD_RAW_TARGET_PATH | DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, device_name.c_str(), target_path.c_str()) == TRUE; } -bool DefineDosDeviceIfNotExists(const string16& device_name) { +bool DefineDosDeviceIfNotExists(const base::string16& device_name) { // We create a DOS device name for the device at \Device\<device_name>. - string16 target_path = L"\\Device\\" + device_name; + base::string16 target_path = L"\\Device\\" + device_name; TCHAR target[kStringLength]; if (QueryDosDevice(device_name.c_str(), target, kStringLength) > 0 && @@ -565,10 +565,10 @@ bool DefineDosDeviceIfNotExists(const string16& device_name) { target_path.compare(target) == 0; } -HANDLE GetFileHandle(const string16& device_name) { +HANDLE GetFileHandle(const base::string16& device_name) { // We access a device with DOS path \Device\<device_name> at // \\.\<device_name>. - string16 formatted_device_name = L"\\\\.\\" + device_name; + base::string16 formatted_device_name = L"\\\\.\\" + device_name; return CreateFile(formatted_device_name.c_str(), GENERIC_READ, @@ -610,7 +610,7 @@ bool ResizeBuffer(int requested_size, scoped_ptr_malloc<BYTE>* buffer) { return buffer != NULL; } -bool GetSystemDirectory(string16* path) { +bool GetSystemDirectory(base::string16* path) { DCHECK(path); // Return value includes terminating NULL. int buffer_size = ::GetSystemDirectory(NULL, 0); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 26b33d4..53e9841 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -252,7 +252,7 @@ class GpuSandboxedProcessLauncherDelegate #endif if (cmd_line_->HasSwitch(switches::kEnableLogging)) { - string16 log_file_path = logging::GetLogFileFullPath(); + base::string16 log_file_path = logging::GetLogFileFullPath(); if (!log_file_path.empty()) { result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, sandbox::TargetPolicy::FILES_ALLOW_ANY, diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc index 766d6a4..92f4b22 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.cc +++ b/content/browser/indexed_db/indexed_db_backing_store.cc @@ -157,7 +157,7 @@ static void PutVarInt(LevelDBTransaction* transaction, template <typename DBOrTransaction> WARN_UNUSED_RESULT static bool GetString(DBOrTransaction* db, const StringPiece& key, - string16* found_string, + base::string16* found_string, bool* found) { std::string result; *found = false; @@ -172,7 +172,7 @@ WARN_UNUSED_RESULT static bool GetString(DBOrTransaction* db, static void PutString(LevelDBTransaction* transaction, const StringPiece& key, - const string16& value) { + const base::string16& value) { std::string buffer; EncodeString(value, &buffer); transaction->Put(key, &buffer); @@ -653,8 +653,8 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Create( return backing_store; } -std::vector<string16> IndexedDBBackingStore::GetDatabaseNames() { - std::vector<string16> found_names; +std::vector<base::string16> IndexedDBBackingStore::GetDatabaseNames() { + std::vector<base::string16> found_names; const std::string start_key = DatabaseNameKey::EncodeMinKeyForOrigin(origin_identifier_); const std::string stop_key = @@ -678,7 +678,7 @@ std::vector<string16> IndexedDBBackingStore::GetDatabaseNames() { } bool IndexedDBBackingStore::GetIDBDatabaseMetaData( - const string16& name, + const base::string16& name, IndexedDBDatabaseMetadata* metadata, bool* found) { const std::string key = DatabaseNameKey::Encode(origin_identifier_, name); @@ -755,10 +755,11 @@ WARN_UNUSED_RESULT static bool GetNewDatabaseId(LevelDBTransaction* transaction, return true; } -bool IndexedDBBackingStore::CreateIDBDatabaseMetaData(const string16& name, - const string16& version, - int64 int_version, - int64* row_id) { +bool IndexedDBBackingStore::CreateIDBDatabaseMetaData( + const base::string16& name, + const base::string16& version, + int64 int_version, + int64* row_id) { scoped_refptr<LevelDBTransaction> transaction = new LevelDBTransaction(db_.get()); @@ -811,7 +812,7 @@ static void DeleteRange(LevelDBTransaction* transaction, transaction->Remove(it->Key()); } -bool IndexedDBBackingStore::DeleteDatabase(const string16& name) { +bool IndexedDBBackingStore::DeleteDatabase(const base::string16& name) { IDB_TRACE("IndexedDBBackingStore::DeleteDatabase"); scoped_ptr<LevelDBWriteOnlyTransaction> transaction = LevelDBWriteOnlyTransaction::Create(db_.get()); @@ -895,7 +896,7 @@ bool IndexedDBBackingStore::GetObjectStores( // TODO(jsbell): Do this by direct key lookup rather than iteration, to // simplify. - string16 object_store_name; + base::string16 object_store_name; { StringPiece slice(it->Value()); if (!DecodeString(&slice, &object_store_name) || !slice.empty()) @@ -1049,7 +1050,7 @@ bool IndexedDBBackingStore::CreateObjectStore( IndexedDBBackingStore::Transaction* transaction, int64 database_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool auto_increment) { IDB_TRACE("IndexedDBBackingStore::CreateObjectStore"); @@ -1103,7 +1104,7 @@ bool IndexedDBBackingStore::DeleteObjectStore( return false; LevelDBTransaction* leveldb_transaction = transaction->transaction(); - string16 object_store_name; + base::string16 object_store_name; bool found = false; bool ok = GetString( leveldb_transaction, @@ -1473,7 +1474,7 @@ bool IndexedDBBackingStore::GetIndexes( // TODO(jsbell): Do this by direct key lookup rather than iteration, to // simplify. int64 index_id = meta_data_key.IndexId(); - string16 index_name; + base::string16 index_name; { StringPiece slice(it->Value()); if (!DecodeString(&slice, &index_name) || !slice.empty()) @@ -1553,7 +1554,7 @@ bool IndexedDBBackingStore::CreateIndex( int64 database_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool is_unique, bool is_multi_entry) { diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h index 9ea71f1..00b15a3 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.h +++ b/content/browser/indexed_db/indexed_db_backing_store.h @@ -69,19 +69,19 @@ class CONTENT_EXPORT IndexedDBBackingStore const GURL& origin_url, LevelDBFactory* factory); - virtual std::vector<string16> GetDatabaseNames(); - virtual bool GetIDBDatabaseMetaData(const string16& name, + virtual std::vector<base::string16> GetDatabaseNames(); + virtual bool GetIDBDatabaseMetaData(const base::string16& name, IndexedDBDatabaseMetadata* metadata, bool* success) WARN_UNUSED_RESULT; - virtual bool CreateIDBDatabaseMetaData(const string16& name, - const string16& version, + virtual bool CreateIDBDatabaseMetaData(const base::string16& name, + const base::string16& version, int64 int_version, int64* row_id); virtual bool UpdateIDBDatabaseIntVersion( IndexedDBBackingStore::Transaction* transaction, int64 row_id, int64 int_version); - virtual bool DeleteDatabase(const string16& name); + virtual bool DeleteDatabase(const base::string16& name); bool GetObjectStores(int64 database_id, IndexedDBDatabaseMetadata::ObjectStoreMap* map) @@ -90,7 +90,7 @@ class CONTENT_EXPORT IndexedDBBackingStore IndexedDBBackingStore::Transaction* transaction, int64 database_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool auto_increment); virtual bool DeleteObjectStore( @@ -160,7 +160,7 @@ class CONTENT_EXPORT IndexedDBBackingStore int64 database_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool is_unique, bool is_multi_entry) WARN_UNUSED_RESULT; diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc index 396189e..d3e8296 100644 --- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc +++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc @@ -236,19 +236,19 @@ TEST_F(IndexedDBBackingStoreTest, InvalidIds) { } TEST_F(IndexedDBBackingStoreTest, CreateDatabase) { - const string16 database_name(ASCIIToUTF16("db1")); + const base::string16 database_name(ASCIIToUTF16("db1")); int64 database_id; - const string16 version(ASCIIToUTF16("old_string_version")); + const base::string16 version(ASCIIToUTF16("old_string_version")); const int64 int_version = 9; const int64 object_store_id = 99; - const string16 object_store_name(ASCIIToUTF16("object_store1")); + const base::string16 object_store_name(ASCIIToUTF16("object_store1")); const bool auto_increment = true; const IndexedDBKeyPath object_store_key_path( ASCIIToUTF16("object_store_key")); const int64 index_id = 999; - const string16 index_name(ASCIIToUTF16("index1")); + const base::string16 index_name(ASCIIToUTF16("index1")); const bool unique = true; const bool multi_entry = true; const IndexedDBKeyPath index_key_path(ASCIIToUTF16("index_key")); diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc index 687ce48..74b81b6 100644 --- a/content/browser/indexed_db/indexed_db_browsertest.cc +++ b/content/browser/indexed_db/indexed_db_browsertest.cc @@ -66,7 +66,7 @@ class IndexedDBBrowserTest : public ContentBrowserTest { if (hash) url = GURL(url.spec() + hash); - string16 expected_title16(ASCIIToUTF16(expected_string)); + base::string16 expected_title16(ASCIIToUTF16(expected_string)); TitleWatcher title_watcher(shell->web_contents(), expected_title16); NavigateToURL(shell, url); EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); @@ -399,7 +399,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ConnectionsClosedOnTabClose) { NavigateAndWaitForTitle(new_shell, "version_change_blocked.html", "#tab2", "setVersion(3) blocked"); - string16 expected_title16(ASCIIToUTF16("setVersion(3) complete")); + base::string16 expected_title16(ASCIIToUTF16("setVersion(3) complete")); TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); base::KillProcess( @@ -421,7 +421,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ForceCloseEventTest) { GetContext(), GURL("file:///"))); - string16 expected_title16(ASCIIToUTF16("connection closed")); + base::string16 expected_title16(ASCIIToUTF16("connection closed")); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); } diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc index 587b66f..755551c 100644 --- a/content/browser/indexed_db/indexed_db_callbacks.cc +++ b/content/browser/indexed_db/indexed_db_callbacks.cc @@ -71,7 +71,7 @@ void IndexedDBCallbacks::OnError(const IndexedDBDatabaseError& error) { dispatcher_host_ = NULL; } -void IndexedDBCallbacks::OnSuccess(const std::vector<string16>& value) { +void IndexedDBCallbacks::OnSuccess(const std::vector<base::string16>& value) { DCHECK(dispatcher_host_.get()); DCHECK_EQ(kNoCursor, ipc_cursor_id_); @@ -79,7 +79,7 @@ void IndexedDBCallbacks::OnSuccess(const std::vector<string16>& value) { DCHECK_EQ(kNoDatabase, ipc_database_id_); DCHECK_EQ(kNoDatabaseCallbacks, ipc_database_callbacks_id_); - std::vector<string16> list; + std::vector<base::string16> list; for (unsigned i = 0; i < value.size(); ++i) list.push_back(value[i]); diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h index 1ea0c0b..048b563 100644 --- a/content/browser/indexed_db/indexed_db_callbacks.h +++ b/content/browser/indexed_db/indexed_db_callbacks.h @@ -51,7 +51,7 @@ class CONTENT_EXPORT IndexedDBCallbacks virtual void OnError(const IndexedDBDatabaseError& error); // IndexedDBFactory::GetDatabaseNames - virtual void OnSuccess(const std::vector<string16>& string); + virtual void OnSuccess(const std::vector<base::string16>& string); // IndexedDBFactory::Open / DeleteDatabase virtual void OnBlocked(int64 existing_version); diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc index 8d63293..258b01e 100644 --- a/content/browser/indexed_db/indexed_db_database.cc +++ b/content/browser/indexed_db/indexed_db_database.cc @@ -108,7 +108,7 @@ class IndexedDBDatabase::PendingDeleteCall { }; scoped_refptr<IndexedDBDatabase> IndexedDBDatabase::Create( - const string16& name, + const base::string16& name, IndexedDBBackingStore* backing_store, IndexedDBFactory* factory, const Identifier& unique_identifier) { @@ -128,7 +128,7 @@ bool Contains(const T& container, const U& item) { } } -IndexedDBDatabase::IndexedDBDatabase(const string16& name, +IndexedDBDatabase::IndexedDBDatabase(const base::string16& name, IndexedDBBackingStore* backing_store, IndexedDBFactory* factory, const Identifier& unique_identifier) @@ -273,7 +273,7 @@ bool IndexedDBDatabase::ValidateObjectStoreIdAndNewIndexId( void IndexedDBDatabase::CreateObjectStore(int64 transaction_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool auto_increment) { IDB_TRACE("IndexedDBDatabase::CreateObjectStore"); @@ -351,7 +351,7 @@ void IndexedDBDatabase::DeleteObjectStore(int64 transaction_id, void IndexedDBDatabase::CreateIndex(int64 transaction_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool unique, bool multi_entry) { @@ -392,8 +392,9 @@ void IndexedDBDatabase::CreateIndexOperation( index_metadata.key_path, index_metadata.unique, index_metadata.multi_entry)) { - string16 error_string = ASCIIToUTF16("Internal error creating index '") + - index_metadata.name + ASCIIToUTF16("'."); + base::string16 error_string = + ASCIIToUTF16("Internal error creating index '") + + index_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( blink::WebIDBDatabaseExceptionUnknownError, error_string)); return; @@ -446,8 +447,9 @@ void IndexedDBDatabase::DeleteIndexOperation( object_store_id, index_metadata.id); if (!ok) { - string16 error_string = ASCIIToUTF16("Internal error deleting index '") + - index_metadata.name + ASCIIToUTF16("'."); + base::string16 error_string = + ASCIIToUTF16("Internal error deleting index '") + + index_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( blink::WebIDBDatabaseExceptionUnknownError, error_string)); } @@ -791,7 +793,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, } ScopedVector<IndexWriter> index_writers; - string16 error_message; + base::string16 error_message; bool obeys_constraints = false; bool backing_store_success = MakeIndexWriters(transaction, backing_store_.get(), @@ -897,7 +899,7 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id, } ScopedVector<IndexWriter> index_writers; - string16 error_message; + base::string16 error_message; bool obeys_constraints = false; DCHECK(metadata_.object_stores.find(object_store_id) != metadata_.object_stores.end()); @@ -1219,7 +1221,7 @@ void IndexedDBDatabase::DeleteObjectStoreOperation( transaction->database()->id(), object_store_metadata.id); if (!ok) { - string16 error_string = + base::string16 error_string = ASCIIToUTF16("Internal error deleting object store '") + object_store_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( @@ -1449,7 +1451,7 @@ void IndexedDBDatabase::OpenConnection( DCHECK_EQ(IndexedDBDatabaseMetadata::NO_INT_VERSION, metadata_.int_version); } else { - string16 message; + base::string16 message; if (version == IndexedDBDatabaseMetadata::NO_INT_VERSION) message = ASCIIToUTF16( "Internal error opening database with no version specified."); @@ -1714,7 +1716,7 @@ void IndexedDBDatabase::DeleteObjectStoreAbortOperation( } void IndexedDBDatabase::VersionChangeAbortOperation( - const string16& previous_version, + const base::string16& previous_version, int64 previous_int_version, IndexedDBTransaction* transaction) { IDB_TRACE("IndexedDBDatabase::VersionChangeAbortOperation"); diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h index fa730b0..b9b4dac 100644 --- a/content/browser/indexed_db/indexed_db_database.h +++ b/content/browser/indexed_db/indexed_db_database.h @@ -52,7 +52,7 @@ class CONTENT_EXPORT IndexedDBDatabase static const int64 kMinimumIndexId = 30; static scoped_refptr<IndexedDBDatabase> Create( - const string16& name, + const base::string16& name, IndexedDBBackingStore* backing_store, IndexedDBFactory* factory, const Identifier& unique_identifier); @@ -88,7 +88,7 @@ class CONTENT_EXPORT IndexedDBDatabase void CreateObjectStore(int64 transaction_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool auto_increment); void DeleteObjectStore(int64 transaction_id, int64 object_store_id); @@ -105,7 +105,7 @@ class CONTENT_EXPORT IndexedDBDatabase void CreateIndex(int64 transaction_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath& key_path, bool unique, bool multi_entry); @@ -198,7 +198,7 @@ class CONTENT_EXPORT IndexedDBDatabase blink::WebIDBDataLoss data_loss, std::string data_loss_message, IndexedDBTransaction* transaction); - void VersionChangeAbortOperation(const string16& previous_version, + void VersionChangeAbortOperation(const base::string16& previous_version, int64 previous_int_version, IndexedDBTransaction* transaction); void CreateIndexOperation(int64 object_store_id, @@ -243,7 +243,7 @@ class CONTENT_EXPORT IndexedDBDatabase private: friend class base::RefCounted<IndexedDBDatabase>; - IndexedDBDatabase(const string16& name, + IndexedDBDatabase(const base::string16& name, IndexedDBBackingStore* backing_store, IndexedDBFactory* factory, const Identifier& unique_identifier); diff --git a/content/browser/indexed_db/indexed_db_database_error.h b/content/browser/indexed_db/indexed_db_database_error.h index 297bec7..1a4f449 100644 --- a/content/browser/indexed_db/indexed_db_database_error.h +++ b/content/browser/indexed_db/indexed_db_database_error.h @@ -17,16 +17,16 @@ class IndexedDBDatabaseError { : code_(code) {} IndexedDBDatabaseError(uint16 code, const char* message) : code_(code), message_(ASCIIToUTF16(message)) {} - IndexedDBDatabaseError(uint16 code, const string16& message) + IndexedDBDatabaseError(uint16 code, const base::string16& message) : code_(code), message_(message) {} ~IndexedDBDatabaseError() {} uint16 code() const { return code_; } - const string16& message() const { return message_; } + const base::string16& message() const { return message_; } private: const uint16 code_; - const string16 message_; + const base::string16 message_; }; } // namespace content diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc index 2cfef62..bd0c0ad 100644 --- a/content/browser/indexed_db/indexed_db_factory.cc +++ b/content/browser/indexed_db/indexed_db_factory.cc @@ -130,7 +130,7 @@ void IndexedDBFactory::GetDatabaseNames( } void IndexedDBFactory::DeleteDatabase( - const string16& name, + const base::string16& name, scoped_refptr<IndexedDBCallbacks> callbacks, const GURL& origin_url, const base::FilePath& data_directory) { @@ -233,7 +233,7 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBFactory::OpenBackingStore( } void IndexedDBFactory::Open( - const string16& name, + const base::string16& name, int64 version, int64 transaction_id, scoped_refptr<IndexedDBCallbacks> callbacks, diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h index b143853..74168d6 100644 --- a/content/browser/indexed_db/indexed_db_factory.h +++ b/content/browser/indexed_db/indexed_db_factory.h @@ -36,7 +36,7 @@ class CONTENT_EXPORT IndexedDBFactory void GetDatabaseNames(scoped_refptr<IndexedDBCallbacks> callbacks, const GURL& origin_url, const base::FilePath& data_directory); - void Open(const string16& name, + void Open(const base::string16& name, int64 version, int64 transaction_id, scoped_refptr<IndexedDBCallbacks> callbacks, @@ -44,7 +44,7 @@ class CONTENT_EXPORT IndexedDBFactory const GURL& origin_url, const base::FilePath& data_directory); - void DeleteDatabase(const string16& name, + void DeleteDatabase(const base::string16& name, scoped_refptr<IndexedDBCallbacks> callbacks, const GURL& origin_url, const base::FilePath& data_directory); diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc index 859c2b7..9afa9e7 100644 --- a/content/browser/indexed_db/indexed_db_factory_unittest.cc +++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc @@ -217,7 +217,7 @@ TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) { new LookingForQuotaErrorMockCallbacks; scoped_refptr<IndexedDBDatabaseCallbacks> dummy_database_callbacks = new IndexedDBDatabaseCallbacks(NULL, 0, 0); - const string16 name(ASCIIToUTF16("name")); + const base::string16 name(ASCIIToUTF16("name")); factory->Open(name, 1, /* version */ 2, /* transaction_id */ diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.cc b/content/browser/indexed_db/indexed_db_fake_backing_store.cc index 8766162..3825982 100644 --- a/content/browser/indexed_db/indexed_db_fake_backing_store.cc +++ b/content/browser/indexed_db/indexed_db_fake_backing_store.cc @@ -10,19 +10,19 @@ namespace content { IndexedDBFakeBackingStore::~IndexedDBFakeBackingStore() {} -std::vector<string16> IndexedDBFakeBackingStore::GetDatabaseNames() { - return std::vector<string16>(); +std::vector<base::string16> IndexedDBFakeBackingStore::GetDatabaseNames() { + return std::vector<base::string16>(); } bool IndexedDBFakeBackingStore::GetIDBDatabaseMetaData( - const string16& name, + const base::string16& name, IndexedDBDatabaseMetadata*, bool* found) { return true; } bool IndexedDBFakeBackingStore::CreateIDBDatabaseMetaData( - const string16& name, - const string16& version, + const base::string16& name, + const base::string16& version, int64 int_version, int64* row_id) { return true; @@ -32,14 +32,14 @@ bool IndexedDBFakeBackingStore::UpdateIDBDatabaseIntVersion(Transaction*, int64 version) { return false; } -bool IndexedDBFakeBackingStore::DeleteDatabase(const string16& name) { +bool IndexedDBFakeBackingStore::DeleteDatabase(const base::string16& name) { return true; } bool IndexedDBFakeBackingStore::CreateObjectStore(Transaction*, int64 database_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath&, bool auto_increment) { return false; @@ -85,7 +85,7 @@ bool IndexedDBFakeBackingStore::CreateIndex(Transaction*, int64 database_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath&, bool is_unique, bool is_multi_entry) { diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.h b/content/browser/indexed_db/indexed_db_fake_backing_store.h index 07b63de..93d047c 100644 --- a/content/browser/indexed_db/indexed_db_fake_backing_store.h +++ b/content/browser/indexed_db/indexed_db_fake_backing_store.h @@ -17,23 +17,23 @@ class IndexedDBFakeBackingStore : public IndexedDBBackingStore { : IndexedDBBackingStore(GURL("http://localhost:81"), scoped_ptr<LevelDBDatabase>(), scoped_ptr<LevelDBComparator>()) {} - virtual std::vector<string16> GetDatabaseNames() OVERRIDE; - virtual bool GetIDBDatabaseMetaData(const string16& name, + virtual std::vector<base::string16> GetDatabaseNames() OVERRIDE; + virtual bool GetIDBDatabaseMetaData(const base::string16& name, IndexedDBDatabaseMetadata*, bool* found) OVERRIDE; - virtual bool CreateIDBDatabaseMetaData(const string16& name, - const string16& version, + virtual bool CreateIDBDatabaseMetaData(const base::string16& name, + const base::string16& version, int64 int_version, int64* row_id) OVERRIDE; virtual bool UpdateIDBDatabaseIntVersion(Transaction*, int64 row_id, int64 version) OVERRIDE; - virtual bool DeleteDatabase(const string16& name) OVERRIDE; + virtual bool DeleteDatabase(const base::string16& name) OVERRIDE; virtual bool CreateObjectStore(Transaction*, int64 database_id, int64 object_store_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath&, bool auto_increment) OVERRIDE; @@ -65,7 +65,7 @@ class IndexedDBFakeBackingStore : public IndexedDBBackingStore { int64 database_id, int64 object_store_id, int64 index_id, - const string16& name, + const base::string16& name, const IndexedDBKeyPath&, bool is_unique, bool is_multi_entry) OVERRIDE; diff --git a/content/browser/indexed_db/indexed_db_index_writer.cc b/content/browser/indexed_db/indexed_db_index_writer.cc index 3b36cad..1c2ac0a 100644 --- a/content/browser/indexed_db/indexed_db_index_writer.cc +++ b/content/browser/indexed_db/indexed_db_index_writer.cc @@ -34,7 +34,7 @@ bool IndexWriter::VerifyIndexKeys( int64 index_id, bool* can_add_keys, const IndexedDBKey& primary_key, - string16* error_message) const { + base::string16* error_message) const { *can_add_keys = false; for (size_t i = 0; i < index_keys_.size(); ++i) { bool ok = AddingKeyAllowed(backing_store, @@ -122,7 +122,7 @@ bool MakeIndexWriters( const std::vector<int64>& index_ids, const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, ScopedVector<IndexWriter>* index_writers, - string16* error_message, + base::string16* error_message, bool* completed) { DCHECK_EQ(index_ids.size(), index_keys.size()); *completed = false; diff --git a/content/browser/indexed_db/indexed_db_index_writer.h b/content/browser/indexed_db/indexed_db_index_writer.h index 2ea1c98..8a2cdad 100644 --- a/content/browser/indexed_db/indexed_db_index_writer.h +++ b/content/browser/indexed_db/indexed_db_index_writer.h @@ -34,7 +34,7 @@ class IndexWriter { int64 index_id, bool* can_add_keys, const IndexedDBKey& primary_key, - string16* error_message) const WARN_UNUSED_RESULT; + base::string16* error_message) const WARN_UNUSED_RESULT; void WriteIndexKeys(const IndexedDBBackingStore::RecordIdentifier& record, IndexedDBBackingStore* store, @@ -68,7 +68,7 @@ bool MakeIndexWriters( const std::vector<int64>& index_ids, const std::vector<IndexedDBDatabase::IndexKeys>& index_keys, ScopedVector<IndexWriter>* index_writers, - string16* error_message, + base::string16* error_message, bool* completed) WARN_UNUSED_RESULT; } // namespace content diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc index dd3964a..fad767c 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc +++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc @@ -257,7 +257,7 @@ void EncodeVarInt(int64 value, std::string* into) { } while (n); } -void EncodeString(const string16& value, std::string* into) { +void EncodeString(const base::string16& value, std::string* into) { if (value.empty()) return; // Backing store is UTF-16BE, convert from host endianness. @@ -277,7 +277,7 @@ void EncodeBinary(const std::string& value, std::string* into) { DCHECK(into->size() >= value.size()); } -void EncodeStringWithLength(const string16& value, std::string* into) { +void EncodeStringWithLength(const base::string16& value, std::string* into) { EncodeVarInt(value.length(), into); EncodeString(value, into); } @@ -355,7 +355,7 @@ void EncodeIDBKeyPath(const IndexedDBKeyPath& value, std::string* into) { break; } case WebIDBKeyPathTypeArray: { - const std::vector<string16>& array = value.array(); + const std::vector<base::string16>& array = value.array(); size_t count = array.size(); EncodeVarInt(count, into); for (size_t i = 0; i < count; ++i) { @@ -421,7 +421,7 @@ bool DecodeVarInt(StringPiece* slice, int64* value) { return true; } -bool DecodeString(StringPiece* slice, string16* value) { +bool DecodeString(StringPiece* slice, base::string16* value) { if (slice->empty()) { value->clear(); return true; @@ -430,7 +430,7 @@ bool DecodeString(StringPiece* slice, string16* value) { // Backing store is UTF-16BE, convert to host endianness. DCHECK(!(slice->size() % sizeof(char16))); size_t length = slice->size() / sizeof(char16); - string16 decoded; + base::string16 decoded; decoded.reserve(length); const char16* encoded = reinterpret_cast<const char16*>(slice->begin()); for (unsigned i = 0; i < length; ++i) @@ -441,7 +441,7 @@ bool DecodeString(StringPiece* slice, string16* value) { return true; } -bool DecodeStringWithLength(StringPiece* slice, string16* value) { +bool DecodeStringWithLength(StringPiece* slice, base::string16* value) { if (slice->empty()) return false; @@ -510,7 +510,7 @@ bool DecodeIDBKey(StringPiece* slice, scoped_ptr<IndexedDBKey>* value) { return true; } case kIndexedDBKeyStringTypeByte: { - string16 s; + base::string16 s; if (!DecodeStringWithLength(slice, &s)) return false; *value = make_scoped_ptr(new IndexedDBKey(s)); @@ -551,7 +551,7 @@ bool DecodeIDBKeyPath(StringPiece* slice, IndexedDBKeyPath* value) { // always written as typed. if (slice->size() < 3 || (*slice)[0] != kIndexedDBKeyPathTypeCodedByte1 || (*slice)[1] != kIndexedDBKeyPathTypeCodedByte2) { - string16 s; + base::string16 s; if (!DecodeString(slice, &s)) return false; *value = IndexedDBKeyPath(s); @@ -569,7 +569,7 @@ bool DecodeIDBKeyPath(StringPiece* slice, IndexedDBKeyPath* value) { *value = IndexedDBKeyPath(); return true; case WebIDBKeyPathTypeString: { - string16 string; + base::string16 string; if (!DecodeStringWithLength(slice, &string)) return false; DCHECK(slice->empty()); @@ -577,13 +577,13 @@ bool DecodeIDBKeyPath(StringPiece* slice, IndexedDBKeyPath* value) { return true; } case WebIDBKeyPathTypeArray: { - std::vector<string16> array; + std::vector<base::string16> array; int64 count; if (!DecodeVarInt(slice, &count)) return false; DCHECK_GE(count, 0); while (count--) { - string16 string; + base::string16 string; if (!DecodeStringWithLength(slice, &string)) return false; array.push_back(string); @@ -1324,7 +1324,7 @@ bool DatabaseNameKey::Decode(StringPiece* slice, DatabaseNameKey* result) { } std::string DatabaseNameKey::Encode(const std::string& origin_identifier, - const string16& database_name) { + const base::string16& database_name) { std::string ret = KeyPrefix::EncodeEmpty(); ret.push_back(kDatabaseNameTypeByte); EncodeStringWithLength(base::ASCIIToUTF16(origin_identifier), &ret); @@ -1334,7 +1334,7 @@ std::string DatabaseNameKey::Encode(const std::string& origin_identifier, std::string DatabaseNameKey::EncodeMinKeyForOrigin( const std::string& origin_identifier) { - return Encode(origin_identifier, string16()); + return Encode(origin_identifier, base::string16()); } std::string DatabaseNameKey::EncodeStopKeyForOrigin( @@ -1604,8 +1604,9 @@ bool ObjectStoreNamesKey::Decode(StringPiece* slice, return true; } -std::string ObjectStoreNamesKey::Encode(int64 database_id, - const string16& object_store_name) { +std::string ObjectStoreNamesKey::Encode( + int64 database_id, + const base::string16& object_store_name) { KeyPrefix prefix(database_id); std::string ret = prefix.Encode(); ret.push_back(kObjectStoreNamesTypeByte); @@ -1641,7 +1642,7 @@ bool IndexNamesKey::Decode(StringPiece* slice, IndexNamesKey* result) { std::string IndexNamesKey::Encode(int64 database_id, int64 object_store_id, - const string16& index_name) { + const base::string16& index_name) { KeyPrefix prefix(database_id); std::string ret = prefix.Encode(); ret.push_back(kIndexNamesKeyTypeByte); diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.h b/content/browser/indexed_db/indexed_db_leveldb_coding.h index 8d0c780..d369af0 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding.h +++ b/content/browser/indexed_db/indexed_db_leveldb_coding.h @@ -27,8 +27,9 @@ CONTENT_EXPORT void EncodeByte(unsigned char value, std::string* into); CONTENT_EXPORT void EncodeBool(bool value, std::string* into); CONTENT_EXPORT void EncodeInt(int64 value, std::string* into); CONTENT_EXPORT void EncodeVarInt(int64 value, std::string* into); -CONTENT_EXPORT void EncodeString(const string16& value, std::string* into); -CONTENT_EXPORT void EncodeStringWithLength(const string16& value, +CONTENT_EXPORT void EncodeString(const base::string16& value, + std::string* into); +CONTENT_EXPORT void EncodeStringWithLength(const base::string16& value, std::string* into); CONTENT_EXPORT void EncodeBinary(const std::string& value, std::string* into); CONTENT_EXPORT void EncodeDouble(double value, std::string* into); @@ -45,10 +46,10 @@ CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeInt(base::StringPiece* slice, CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeVarInt(base::StringPiece* slice, int64* value); CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeString(base::StringPiece* slice, - string16* value); + base::string16* value); CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeStringWithLength( base::StringPiece* slice, - string16* value); + base::string16* value); CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeBinary(base::StringPiece* slice, std::string* value); CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeDouble(base::StringPiece* slice, @@ -188,18 +189,19 @@ class DatabaseNameKey { public: static bool Decode(base::StringPiece* slice, DatabaseNameKey* result); CONTENT_EXPORT static std::string Encode(const std::string& origin_identifier, - const string16& database_name); + const base::string16& database_name); static std::string EncodeMinKeyForOrigin( const std::string& origin_identifier); static std::string EncodeStopKeyForOrigin( const std::string& origin_identifier); - string16 origin() const { return origin_; } - string16 database_name() const { return database_name_; } + base::string16 origin() const { return origin_; } + base::string16 database_name() const { return database_name_; } int Compare(const DatabaseNameKey& other); private: - string16 origin_; // TODO(jsbell): Store encoded strings, or just pointers. - string16 database_name_; + base::string16 origin_; // TODO(jsbell): Store encoded strings, or just + // pointers. + base::string16 database_name_; }; class DatabaseMetaDataKey { @@ -315,14 +317,15 @@ class ObjectStoreNamesKey { // because a mapping is kept in the IndexedDBDatabase. Can the // mapping become unreliable? Can we remove this? static bool Decode(base::StringPiece* slice, ObjectStoreNamesKey* result); - CONTENT_EXPORT static std::string Encode(int64 database_id, - const string16& object_store_name); + CONTENT_EXPORT static std::string Encode( + int64 database_id, + const base::string16& object_store_name); int Compare(const ObjectStoreNamesKey& other); - string16 object_store_name() const { return object_store_name_; } + base::string16 object_store_name() const { return object_store_name_; } private: // TODO(jsbell): Store the encoded string, or just pointers to it. - string16 object_store_name_; + base::string16 object_store_name_; }; class IndexNamesKey { @@ -333,13 +336,13 @@ class IndexNamesKey { static bool Decode(base::StringPiece* slice, IndexNamesKey* result); CONTENT_EXPORT static std::string Encode(int64 database_id, int64 object_store_id, - const string16& index_name); + const base::string16& index_name); int Compare(const IndexNamesKey& other); - string16 index_name() const { return index_name_; } + base::string16 index_name() const { return index_name_; } private: int64 object_store_id_; - string16 index_name_; + base::string16 index_name_; }; class ObjectStoreDataKey { diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc index 6d6ab0b..e968142 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc +++ b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc @@ -304,7 +304,7 @@ TEST(IndexedDBLevelDBCodingTest, DecodeVarInt) { } } -static std::string WrappedEncodeString(string16 value) { +static std::string WrappedEncodeString(base::string16 value) { std::string buffer; EncodeString(value, &buffer); return buffer; @@ -321,24 +321,24 @@ TEST(IndexedDBLevelDBCodingTest, EncodeString) { EXPECT_EQ(static_cast<size_t>(6), WrappedEncodeString(ASCIIToUTF16("foo")).size()); EXPECT_EQ(static_cast<size_t>(6), - WrappedEncodeString(string16(test_string_a)).size()); + WrappedEncodeString(base::string16(test_string_a)).size()); EXPECT_EQ(static_cast<size_t>(4), - WrappedEncodeString(string16(test_string_b)).size()); + WrappedEncodeString(base::string16(test_string_b)).size()); } TEST(IndexedDBLevelDBCodingTest, DecodeString) { const char16 test_string_a[] = {'f', 'o', 'o', '\0'}; const char16 test_string_b[] = {0xdead, 0xbeef, '\0'}; - std::vector<string16> test_cases; - test_cases.push_back(string16()); + std::vector<base::string16> test_cases; + test_cases.push_back(base::string16()); test_cases.push_back(ASCIIToUTF16("a")); test_cases.push_back(ASCIIToUTF16("foo")); test_cases.push_back(test_string_a); test_cases.push_back(test_string_b); for (size_t i = 0; i < test_cases.size(); ++i) { - const string16& test_case = test_cases[i]; + const base::string16& test_case = test_cases[i]; std::string v = WrappedEncodeString(test_case); StringPiece slice; @@ -346,7 +346,7 @@ TEST(IndexedDBLevelDBCodingTest, DecodeString) { slice = StringPiece(&*v.begin(), v.size()); } - string16 result; + base::string16 result; EXPECT_TRUE(DecodeString(&slice, &result)); EXPECT_EQ(test_case, result); EXPECT_TRUE(slice.empty()); @@ -360,7 +360,7 @@ TEST(IndexedDBLevelDBCodingTest, DecodeString) { } } -static std::string WrappedEncodeStringWithLength(string16 value) { +static std::string WrappedEncodeStringWithLength(base::string16 value) { std::string buffer; EncodeStringWithLength(value, &buffer); return buffer; @@ -371,13 +371,15 @@ TEST(IndexedDBLevelDBCodingTest, EncodeStringWithLength) { const char16 test_string_b[] = {0xdead, 0xbeef, '\0'}; EXPECT_EQ(static_cast<size_t>(1), - WrappedEncodeStringWithLength(string16()).size()); + WrappedEncodeStringWithLength(base::string16()).size()); EXPECT_EQ(static_cast<size_t>(3), WrappedEncodeStringWithLength(ASCIIToUTF16("a")).size()); EXPECT_EQ(static_cast<size_t>(7), - WrappedEncodeStringWithLength(string16(test_string_a)).size()); + WrappedEncodeStringWithLength( + base::string16(test_string_a)).size()); EXPECT_EQ(static_cast<size_t>(5), - WrappedEncodeStringWithLength(string16(test_string_b)).size()); + WrappedEncodeStringWithLength( + base::string16(test_string_b)).size()); } TEST(IndexedDBLevelDBCodingTest, DecodeStringWithLength) { @@ -390,20 +392,20 @@ TEST(IndexedDBLevelDBCodingTest, DecodeStringWithLength) { long_string[i] = i; long_string[kLongStringLen] = 0; - std::vector<string16> test_cases; + std::vector<base::string16> test_cases; test_cases.push_back(ASCIIToUTF16("")); test_cases.push_back(ASCIIToUTF16("a")); test_cases.push_back(ASCIIToUTF16("foo")); - test_cases.push_back(string16(test_string_a)); - test_cases.push_back(string16(test_string_b)); - test_cases.push_back(string16(long_string)); + test_cases.push_back(base::string16(test_string_a)); + test_cases.push_back(base::string16(test_string_b)); + test_cases.push_back(base::string16(long_string)); for (size_t i = 0; i < test_cases.size(); ++i) { - string16 s = test_cases[i]; + base::string16 s = test_cases[i]; std::string v = WrappedEncodeStringWithLength(s); ASSERT_GT(v.size(), static_cast<size_t>(0)); StringPiece slice(v); - string16 res; + base::string16 res; EXPECT_TRUE(DecodeStringWithLength(&slice, &res)); EXPECT_EQ(s, res); EXPECT_TRUE(slice.empty()); @@ -444,23 +446,23 @@ TEST(IndexedDBLevelDBCodingTest, CompareEncodedStringsWithLength) { const char16 test_string_e[] = {0xd834, 0xdd1e, '\0'}; const char16 test_string_f[] = {0xfffd, '\0'}; - std::vector<string16> test_cases; + std::vector<base::string16> test_cases; test_cases.push_back(ASCIIToUTF16("")); test_cases.push_back(ASCIIToUTF16("a")); test_cases.push_back(ASCIIToUTF16("b")); test_cases.push_back(ASCIIToUTF16("baaa")); test_cases.push_back(ASCIIToUTF16("baab")); test_cases.push_back(ASCIIToUTF16("c")); - test_cases.push_back(string16(test_string_a)); - test_cases.push_back(string16(test_string_b)); - test_cases.push_back(string16(test_string_c)); - test_cases.push_back(string16(test_string_d)); - test_cases.push_back(string16(test_string_e)); - test_cases.push_back(string16(test_string_f)); + test_cases.push_back(base::string16(test_string_a)); + test_cases.push_back(base::string16(test_string_b)); + test_cases.push_back(base::string16(test_string_c)); + test_cases.push_back(base::string16(test_string_d)); + test_cases.push_back(base::string16(test_string_e)); + test_cases.push_back(base::string16(test_string_f)); for (size_t i = 0; i < test_cases.size() - 1; ++i) { - string16 a = test_cases[i]; - string16 b = test_cases[i + 1]; + base::string16 a = test_cases[i]; + base::string16 b = test_cases[i + 1]; EXPECT_LT(a.compare(b), 0); EXPECT_GT(b.compare(a), 0); @@ -630,7 +632,7 @@ TEST(IndexedDBLevelDBCodingTest, EncodeDecodeIDBKeyPath) { } { - key_paths.push_back(IndexedDBKeyPath(string16())); + key_paths.push_back(IndexedDBKeyPath(base::string16())); char expected[] = {0, 0, // Header 1, // Type is string 0 // Length is 0 @@ -661,8 +663,8 @@ TEST(IndexedDBLevelDBCodingTest, EncodeDecodeIDBKeyPath) { } { - std::vector<string16> array; - array.push_back(string16()); + std::vector<base::string16> array; + array.push_back(base::string16()); array.push_back(ASCIIToUTF16("foo")); array.push_back(ASCIIToUTF16("foo.bar")); @@ -700,7 +702,7 @@ TEST(IndexedDBLevelDBCodingTest, DecodeLegacyIDBKeyPath) { std::vector<std::string> encoded_paths; { - key_paths.push_back(IndexedDBKeyPath(string16())); + key_paths.push_back(IndexedDBKeyPath(base::string16())); encoded_paths.push_back(std::string()); } { diff --git a/content/browser/indexed_db/indexed_db_metadata.cc b/content/browser/indexed_db/indexed_db_metadata.cc index 80d3142..47b7219 100644 --- a/content/browser/indexed_db/indexed_db_metadata.cc +++ b/content/browser/indexed_db/indexed_db_metadata.cc @@ -7,7 +7,7 @@ namespace content { IndexedDBObjectStoreMetadata::IndexedDBObjectStoreMetadata( - const string16& name, + const base::string16& name, int64 id, const IndexedDBKeyPath& key_path, bool auto_increment, @@ -23,11 +23,12 @@ IndexedDBObjectStoreMetadata::~IndexedDBObjectStoreMetadata() {} IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata() : int_version(NO_INT_VERSION) {} -IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata(const string16& name, - int64 id, - const string16& version, - int64 int_version, - int64 max_object_store_id) +IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata( + const base::string16& name, + int64 id, + const base::string16& version, + int64 int_version, + int64 max_object_store_id) : name(name), id(id), version(version), diff --git a/content/browser/indexed_db/indexed_db_metadata.h b/content/browser/indexed_db/indexed_db_metadata.h index 4e8562d..00970a6 100644 --- a/content/browser/indexed_db/indexed_db_metadata.h +++ b/content/browser/indexed_db/indexed_db_metadata.h @@ -15,7 +15,7 @@ namespace content { struct IndexedDBIndexMetadata { IndexedDBIndexMetadata() {} - IndexedDBIndexMetadata(const string16& name, + IndexedDBIndexMetadata(const base::string16& name, int64 id, const IndexedDBKeyPath& key_path, bool unique, @@ -25,7 +25,7 @@ struct IndexedDBIndexMetadata { key_path(key_path), unique(unique), multi_entry(multi_entry) {} - string16 name; + base::string16 name; int64 id; IndexedDBKeyPath key_path; bool unique; @@ -36,13 +36,13 @@ struct IndexedDBIndexMetadata { struct CONTENT_EXPORT IndexedDBObjectStoreMetadata { IndexedDBObjectStoreMetadata(); - IndexedDBObjectStoreMetadata(const string16& name, + IndexedDBObjectStoreMetadata(const base::string16& name, int64 id, const IndexedDBKeyPath& key_path, bool auto_increment, int64 max_index_id); ~IndexedDBObjectStoreMetadata(); - string16 name; + base::string16 name; int64 id; IndexedDBKeyPath key_path; bool auto_increment; @@ -64,16 +64,16 @@ struct CONTENT_EXPORT IndexedDBDatabaseMetadata { typedef std::map<int64, IndexedDBObjectStoreMetadata> ObjectStoreMap; IndexedDBDatabaseMetadata(); - IndexedDBDatabaseMetadata(const string16& name, + IndexedDBDatabaseMetadata(const base::string16& name, int64 id, - const string16& version, + const base::string16& version, int64 int_version, int64 max_object_store_id); ~IndexedDBDatabaseMetadata(); - string16 name; + base::string16 name; int64 id; - string16 version; + base::string16 version; int64 int_version; int64 max_object_store_id; diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc index 0a763fe..011c975 100644 --- a/content/browser/loader/resource_dispatcher_host_browsertest.cc +++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc @@ -59,13 +59,13 @@ class ResourceDispatcherHostBrowserTest : public ContentBrowserTest, void CheckTitleTest(const GURL& url, const std::string& expected_title) { - string16 expected_title16(ASCIIToUTF16(expected_title)); + base::string16 expected_title16(ASCIIToUTF16(expected_title)); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); NavigateToURL(shell(), url); EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); } - bool GetPopupTitle(const GURL& url, string16* title) { + bool GetPopupTitle(const GURL& url, base::string16* title) { NavigateToURL(shell(), url); ShellAddedObserver new_shell_observer; @@ -96,7 +96,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, DynamicTitle1) { ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); GURL url(embedded_test_server()->GetURL("/dynamic1.html")); - string16 title; + base::string16 title; ASSERT_TRUE(GetPopupTitle(url, &title)); EXPECT_TRUE(StartsWith(title, ASCIIToUTF16("My Popup Title"), true)) << "Actual title: " << title; @@ -108,7 +108,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, DynamicTitle2) { ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); GURL url(embedded_test_server()->GetURL("/dynamic2.html")); - string16 title; + base::string16 title; ASSERT_TRUE(GetPopupTitle(url, &title)); EXPECT_TRUE(StartsWith(title, ASCIIToUTF16("My Dynamic Title"), true)) << "Actual title: " << title; @@ -364,7 +364,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, // URLs are prohibited by policy from interacting with sensitive chrome // pages of which the error page is one. Instead, use automation to kick // off the navigation, and wait to see that the tab loads. - string16 expected_title16(ASCIIToUTF16("Title Of Awesomeness")); + base::string16 expected_title16(ASCIIToUTF16("Title Of Awesomeness")); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); bool success; diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc index 215b3e7..0655823 100644 --- a/content/browser/media/media_browsertest.cc +++ b/content/browser/media/media_browsertest.cc @@ -59,13 +59,13 @@ void MediaBrowserTest::RunMediaTestPage( } void MediaBrowserTest::RunTest(const GURL& gurl, const char* expected) { - const string16 expected_title = ASCIIToUTF16(expected); + const base::string16 expected_title = ASCIIToUTF16(expected); DVLOG(1) << "Running test URL: " << gurl; TitleWatcher title_watcher(shell()->web_contents(), expected_title); AddWaitForTitles(&title_watcher); NavigateToURL(shell(), gurl); - string16 final_title = title_watcher.WaitAndGetTitle(); + base::string16 final_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, final_title); } diff --git a/content/browser/media/media_internals.cc b/content/browser/media/media_internals.cc index 1e0538e..1ee42d1 100644 --- a/content/browser/media/media_internals.cc +++ b/content/browser/media/media_internals.cc @@ -17,8 +17,8 @@ namespace { static base::LazyInstance<content::MediaInternals>::Leaky g_media_internals = LAZY_INSTANCE_INITIALIZER; -string16 SerializeUpdate(const std::string& function, - const base::Value* value) { +base::string16 SerializeUpdate(const std::string& function, + const base::Value* value) { return content::WebUI::GetJavascriptCall( function, std::vector<const base::Value*>(1, value)); } @@ -185,7 +185,7 @@ void MediaInternals::RemoveUpdateCallback(const UpdateCallback& callback) { } void MediaInternals::SendEverything() { - string16 everything_update; + base::string16 everything_update; { base::AutoLock auto_lock(lock_); everything_update = SerializeUpdate( @@ -194,7 +194,7 @@ void MediaInternals::SendEverything() { SendUpdate(everything_update); } -void MediaInternals::SendUpdate(const string16& update) { +void MediaInternals::SendUpdate(const base::string16& update) { // SendUpdate() may be called from any thread, but must run on the IO thread. // TODO(dalecurtis): This is pretty silly since the update callbacks simply // forward the calls to the UI thread. We should avoid the extra hop. diff --git a/content/browser/media/media_internals.h b/content/browser/media/media_internals.h index 8a179e0..c0f144a 100644 --- a/content/browser/media/media_internals.h +++ b/content/browser/media/media_internals.h @@ -37,7 +37,7 @@ class CONTENT_EXPORT MediaInternals const std::vector<media::MediaLogEvent>& events); // Called with the update string. - typedef base::Callback<void(const string16&)> UpdateCallback; + typedef base::Callback<void(const base::string16&)> UpdateCallback; // Add/remove update callbacks (see above). Must be called on the IO thread. void AddUpdateCallback(const UpdateCallback& callback); @@ -59,7 +59,7 @@ class CONTENT_EXPORT MediaInternals // Sends |update| to each registered UpdateCallback. Safe to call from any // thread, but will forward to the IO thread. - void SendUpdate(const string16& update); + void SendUpdate(const base::string16& update); // Caches |value| under |cache_key| so that future SendEverything() calls will // include the current data. Calls JavaScript |function|(|value|) for each diff --git a/content/browser/media/media_internals_handler.cc b/content/browser/media/media_internals_handler.cc index a45dd4f..9a3e7be 100644 --- a/content/browser/media/media_internals_handler.cc +++ b/content/browser/media/media_internals_handler.cc @@ -38,12 +38,12 @@ void MediaInternalsMessageHandler::OnGetEverything( proxy_->GetEverything(); } -void MediaInternalsMessageHandler::OnUpdate(const string16& update) { +void MediaInternalsMessageHandler::OnUpdate(const base::string16& update) { // Don't try to execute JavaScript in a RenderView that no longer exists nor // if the chrome://media-internals page hasn't finished loading. RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); if (host && page_load_complete_) - host->ExecuteJavascriptInWebFrame(string16(), update); + host->ExecuteJavascriptInWebFrame(base::string16(), update); } } // namespace content diff --git a/content/browser/media/media_internals_handler.h b/content/browser/media/media_internals_handler.h index 8ea6f88..265c122 100644 --- a/content/browser/media/media_internals_handler.h +++ b/content/browser/media/media_internals_handler.h @@ -30,7 +30,7 @@ class MediaInternalsMessageHandler : public WebUIMessageHandler { void OnGetEverything(const base::ListValue* list); // MediaInternals message handlers. - void OnUpdate(const string16& update); + void OnUpdate(const base::string16& update); private: scoped_refptr<MediaInternalsProxy> proxy_; diff --git a/content/browser/media/media_internals_proxy.cc b/content/browser/media/media_internals_proxy.cc index d0e0622..49456ab 100644 --- a/content/browser/media/media_internals_proxy.cc +++ b/content/browser/media/media_internals_proxy.cc @@ -69,7 +69,7 @@ void MediaInternalsProxy::GetEverything() { CallJavaScriptFunctionOnUIThread("media.onReceiveConstants", GetConstants()); } -void MediaInternalsProxy::OnUpdate(const string16& update) { +void MediaInternalsProxy::OnUpdate(const base::string16& update) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, @@ -140,7 +140,7 @@ void MediaInternalsProxy::GetEverythingOnIOThread() { MediaInternals::GetInstance()->SendEverything(); } -void MediaInternalsProxy::UpdateUIOnUIThread(const string16& update) { +void MediaInternalsProxy::UpdateUIOnUIThread(const base::string16& update) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Don't forward updates to a destructed UI. if (handler_) @@ -175,7 +175,7 @@ void MediaInternalsProxy::CallJavaScriptFunctionOnUIThread( scoped_ptr<base::Value> args_value(args); std::vector<const base::Value*> args_vector; args_vector.push_back(args_value.get()); - string16 update = WebUI::GetJavascriptCall(function, args_vector); + base::string16 update = WebUI::GetJavascriptCall(function, args_vector); UpdateUIOnUIThread(update); } diff --git a/content/browser/media/media_internals_proxy.h b/content/browser/media/media_internals_proxy.h index 5d173b3..b737b85 100644 --- a/content/browser/media/media_internals_proxy.h +++ b/content/browser/media/media_internals_proxy.h @@ -49,7 +49,7 @@ class MediaInternalsProxy void GetEverything(); // MediaInternals callback. Called on the IO thread. - void OnUpdate(const string16& update); + void OnUpdate(const base::string16& update); // net::NetLog::ThreadSafeObserver implementation. Callable from any thread: virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE; @@ -65,7 +65,7 @@ class MediaInternalsProxy void ObserveMediaInternalsOnIOThread(); void StopObservingMediaInternalsOnIOThread(); void GetEverythingOnIOThread(); - void UpdateUIOnUIThread(const string16& update); + void UpdateUIOnUIThread(const base::string16& update); // Put |entry| on a list of events to be sent to the page. void AddNetEventOnUIThread(base::Value* entry); diff --git a/content/browser/media/media_internals_unittest.cc b/content/browser/media/media_internals_unittest.cc index e16124b..2947104 100644 --- a/content/browser/media/media_internals_unittest.cc +++ b/content/browser/media/media_internals_unittest.cc @@ -45,7 +45,7 @@ class MediaInternalsTest protected: // Extracts and deserializes the JSON update data; merges into |update_data_|. - void UpdateCallbackImpl(const string16& update) { + void UpdateCallbackImpl(const base::string16& update) { // Each update string looks like "<JavaScript Function Name>({<JSON>});", to // use the JSON reader we need to strip out the JavaScript code. std::string utf8_update = base::UTF16ToUTF8(update); diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc index bfb96e1..e63207d 100644 --- a/content/browser/media/webrtc_browsertest.cc +++ b/content/browser/media/webrtc_browsertest.cc @@ -130,7 +130,7 @@ class WebrtcBrowserTest: public ContentBrowserTest { } void ExpectTitle(const std::string& expected_title) const { - string16 expected_title16(ASCIIToUTF16(expected_title)); + base::string16 expected_title16(ASCIIToUTF16(expected_title)); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); } diff --git a/content/browser/media/webrtc_internals_browsertest.cc b/content/browser/media/webrtc_internals_browsertest.cc index b458276..0d279b3 100644 --- a/content/browser/media/webrtc_internals_browsertest.cc +++ b/content/browser/media/webrtc_internals_browsertest.cc @@ -145,7 +145,7 @@ class MAYBE_WebRTCInternalsBrowserTest: public ContentBrowserTest { } void ExpectTitle(const std::string& expected_title) const { - string16 expected_title16(ASCIIToUTF16(expected_title)); + base::string16 expected_title16(ASCIIToUTF16(expected_title)); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); } diff --git a/content/browser/media/webrtc_internals_message_handler.cc b/content/browser/media/webrtc_internals_message_handler.cc index 2ba7522..8cf8579 100644 --- a/content/browser/media/webrtc_internals_message_handler.cc +++ b/content/browser/media/webrtc_internals_message_handler.cc @@ -68,11 +68,11 @@ void WebRTCInternalsMessageHandler::OnUpdate(const std::string& command, DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); std::vector<const base::Value*> args_vector; args_vector.push_back(args); - string16 update = WebUI::GetJavascriptCall(command, args_vector); + base::string16 update = WebUI::GetJavascriptCall(command, args_vector); RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); if (host) - host->ExecuteJavascriptInWebFrame(string16(), update); + host->ExecuteJavascriptInWebFrame(base::string16(), update); } } // namespace content diff --git a/content/browser/message_port_service.cc b/content/browser/message_port_service.cc index bc2a1ac..0d9f608 100644 --- a/content/browser/message_port_service.cc +++ b/content/browser/message_port_service.cc @@ -108,7 +108,7 @@ void MessagePortService::Entangle(int local_message_port_id, void MessagePortService::PostMessage( int sender_message_port_id, - const string16& message, + const base::string16& message, const std::vector<int>& sent_message_port_ids) { if (!message_ports_.count(sender_message_port_id)) { NOTREACHED(); @@ -130,7 +130,7 @@ void MessagePortService::PostMessage( void MessagePortService::PostMessageTo( int message_port_id, - const string16& message, + const base::string16& message, const std::vector<int>& sent_message_port_ids) { if (!message_ports_.count(message_port_id)) { NOTREACHED(); diff --git a/content/browser/message_port_service.h b/content/browser/message_port_service.h index 55e536c..6689591 100644 --- a/content/browser/message_port_service.h +++ b/content/browser/message_port_service.h @@ -19,7 +19,8 @@ class MessagePortMessageFilter; class MessagePortService { public: - typedef std::vector<std::pair<string16, std::vector<int> > > QueuedMessages; + typedef std::vector<std::pair<base::string16, std::vector<int> > > + QueuedMessages; // Returns the MessagePortService singleton. static MessagePortService* GetInstance(); @@ -31,7 +32,7 @@ class MessagePortService { void Destroy(int message_port_id); void Entangle(int local_message_port_id, int remote_message_port_id); void PostMessage(int sender_message_port_id, - const string16& message, + const base::string16& message, const std::vector<int>& sent_message_port_ids); void QueueMessages(int message_port_id); void SendQueuedMessages(int message_port_id, @@ -56,7 +57,7 @@ class MessagePortService { ~MessagePortService(); void PostMessageTo(int message_port_id, - const string16& message, + const base::string16& message, const std::vector<int>& sent_message_port_ids); // Handles the details of removing a message port id. Before calling this, diff --git a/content/browser/plugin_browsertest.cc b/content/browser/plugin_browsertest.cc index 2a846f1..204a143 100644 --- a/content/browser/plugin_browsertest.cc +++ b/content/browser/plugin_browsertest.cc @@ -83,12 +83,12 @@ class PluginTest : public ContentBrowserTest { } static void LoadAndWaitInWindow(Shell* window, const GURL& url) { - string16 expected_title(ASCIIToUTF16("OK")); + base::string16 expected_title(ASCIIToUTF16("OK")); TitleWatcher title_watcher(window->web_contents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("plugin_not_found")); NavigateToURL(window, url); - string16 title = title_watcher.WaitAndGetTitle(); + base::string16 title = title_watcher.WaitAndGetTitle(); if (title == ASCIIToUTF16("plugin_not_found")) { const testing::TestInfo* const test_info = testing::UnitTest::GetInstance()->current_test_info(); @@ -170,7 +170,7 @@ IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(SelfDeletePluginInvokeInSynchronousMouseUp)) { NavigateToURL(shell(), GetURL("execute_script_delete_in_mouse_up.html")); - string16 expected_title(ASCIIToUTF16("OK")); + base::string16 expected_title(ASCIIToUTF16("OK")); TitleWatcher title_watcher(shell()->web_contents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); SimulateMouseClick(shell()->web_contents(), 0, @@ -201,7 +201,7 @@ IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(SelfDeletePluginInvokeAlert)) { // race condition where the alert can come up before we start watching for it. shell()->LoadURL(GetURL("self_delete_plugin_invoke_alert.html")); - string16 expected_title(ASCIIToUTF16("OK")); + base::string16 expected_title(ASCIIToUTF16("OK")); TitleWatcher title_watcher(shell()->web_contents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); @@ -408,7 +408,7 @@ IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_PluginConvertPointTest) { NavigateToURL(shell(), GetURL("convert_point.html")); - string16 expected_title(ASCIIToUTF16("OK")); + base::string16 expected_title(ASCIIToUTF16("OK")); TitleWatcher title_watcher(shell()->web_contents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); // TODO(stuartmorgan): When the automation system supports sending clicks, diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc index 8f90723..13620f7 100644 --- a/content/browser/plugin_loader_posix_unittest.cc +++ b/content/browser/plugin_loader_posix_unittest.cc @@ -64,11 +64,11 @@ class PluginLoaderPosixTest : public testing::Test { public: PluginLoaderPosixTest() : plugin1_(ASCIIToUTF16("plugin1"), base::FilePath("/tmp/one.plugin"), - ASCIIToUTF16("1.0"), string16()), + ASCIIToUTF16("1.0"), base::string16()), plugin2_(ASCIIToUTF16("plugin2"), base::FilePath("/tmp/two.plugin"), - ASCIIToUTF16("2.0"), string16()), + ASCIIToUTF16("2.0"), base::string16()), plugin3_(ASCIIToUTF16("plugin3"), base::FilePath("/tmp/three.plugin"), - ASCIIToUTF16("3.0"), string16()), + ASCIIToUTF16("3.0"), base::string16()), file_thread_(BrowserThread::FILE, &message_loop_), io_thread_(BrowserThread::IO, &message_loop_), plugin_loader_(new MockPluginLoaderPosix) { diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc index 1ddcf40..96216c1 100644 --- a/content/browser/plugin_service_impl.cc +++ b/content/browser/plugin_service_impl.cc @@ -547,9 +547,9 @@ bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path, return false; } -string16 PluginServiceImpl::GetPluginDisplayNameByPath( +base::string16 PluginServiceImpl::GetPluginDisplayNameByPath( const base::FilePath& path) { - string16 plugin_name = path.LossyDisplayName(); + base::string16 plugin_name = path.LossyDisplayName(); WebPluginInfo info; if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) && !info.name.empty()) { diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h index 11fb257..c7d95af 100644 --- a/content/browser/plugin_service_impl.h +++ b/content/browser/plugin_service_impl.h @@ -91,7 +91,7 @@ class CONTENT_EXPORT PluginServiceImpl std::string* actual_mime_type) OVERRIDE; virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path, WebPluginInfo* info) OVERRIDE; - virtual string16 GetPluginDisplayNameByPath( + virtual base::string16 GetPluginDisplayNameByPath( const base::FilePath& path) OVERRIDE; virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE; virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo( diff --git a/content/browser/power_save_blocker_win.cc b/content/browser/power_save_blocker_win.cc index fce72c6..cf9bb02 100644 --- a/content/browser/power_save_blocker_win.cc +++ b/content/browser/power_save_blocker_win.cc @@ -39,7 +39,7 @@ HANDLE CreatePowerRequest(POWER_REQUEST_TYPE type, const std::string& reason) { if (!PowerCreateRequestFn || !PowerSetRequestFn) return INVALID_HANDLE_VALUE; } - string16 wide_reason = ASCIIToUTF16(reason); + base::string16 wide_reason = ASCIIToUTF16(reason); REASON_CONTEXT context = {0}; context.Version = POWER_REQUEST_CONTEXT_VERSION; context.Flags = POWER_REQUEST_CONTEXT_SIMPLE_STRING; diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc index fbf512a..f6c9fd5 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc @@ -178,7 +178,7 @@ void PpapiPluginProcessHost::DidDeleteOutOfProcessInstance( // static void PpapiPluginProcessHost::FindByName( - const string16& name, + const base::string16& name, std::vector<PpapiPluginProcessHost*>* hosts) { for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) { if (iter->process_.get() && iter->process_->GetData().name == name) diff --git a/content/browser/ppapi_plugin_process_host.h b/content/browser/ppapi_plugin_process_host.h index 87c79c3..594c12f 100644 --- a/content/browser/ppapi_plugin_process_host.h +++ b/content/browser/ppapi_plugin_process_host.h @@ -92,7 +92,7 @@ class PpapiPluginProcessHost : public BrowserChildProcessHostDelegate, // Returns the instances that match the specified process name. // It can only be called on the IO thread. - static void FindByName(const string16& name, + static void FindByName(const base::string16& name, std::vector<PpapiPluginProcessHost*>* hosts); // IPC::Sender implementation: diff --git a/content/browser/renderer_host/clipboard_message_filter.cc b/content/browser/renderer_host/clipboard_message_filter.cc index ae365d5..6ba95f8 100644 --- a/content/browser/renderer_host/clipboard_message_filter.cc +++ b/content/browser/renderer_host/clipboard_message_filter.cc @@ -145,9 +145,10 @@ void ClipboardMessageFilter::OnGetSequenceNumber(ui::ClipboardType type, *sequence_number = GetClipboard()->GetSequenceNumber(type); } -void ClipboardMessageFilter::OnReadAvailableTypes(ui::ClipboardType type, - std::vector<string16>* types, - bool* contains_filenames) { +void ClipboardMessageFilter::OnReadAvailableTypes( + ui::ClipboardType type, + std::vector<base::string16>* types, + bool* contains_filenames) { GetClipboard()->ReadAvailableTypes(type, types, contains_filenames); } @@ -163,7 +164,7 @@ void ClipboardMessageFilter::OnClear(ui::ClipboardType type) { } void ClipboardMessageFilter::OnReadText(ui::ClipboardType type, - string16* result) { + base::string16* result) { GetClipboard()->ReadText(type, result); } @@ -173,7 +174,7 @@ void ClipboardMessageFilter::OnReadAsciiText(ui::ClipboardType type, } void ClipboardMessageFilter::OnReadHTML(ui::ClipboardType type, - string16* markup, + base::string16* markup, GURL* url, uint32* fragment_start, uint32* fragment_end) { @@ -224,8 +225,8 @@ void ClipboardMessageFilter::OnReadImageReply( } void ClipboardMessageFilter::OnReadCustomData(ui::ClipboardType clipboard_type, - const string16& type, - string16* result) { + const base::string16& type, + base::string16* result) { GetClipboard()->ReadCustomData(clipboard_type, type, result); } diff --git a/content/browser/renderer_host/clipboard_message_filter.h b/content/browser/renderer_host/clipboard_message_filter.h index 3ae7d1b..dd2784b 100644 --- a/content/browser/renderer_host/clipboard_message_filter.h +++ b/content/browser/renderer_host/clipboard_message_filter.h @@ -39,12 +39,12 @@ class ClipboardMessageFilter : public BrowserMessageFilter { bool* result); void OnClear(ui::ClipboardType type); void OnReadAvailableTypes(ui::ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames); - void OnReadText(ui::ClipboardType type, string16* result); + void OnReadText(ui::ClipboardType type, base::string16* result); void OnReadAsciiText(ui::ClipboardType type, std::string* result); void OnReadHTML(ui::ClipboardType type, - string16* markup, + base::string16* markup, GURL* url, uint32* fragment_start, uint32* fragment_end); @@ -52,13 +52,13 @@ class ClipboardMessageFilter : public BrowserMessageFilter { void OnReadImage(ui::ClipboardType type, IPC::Message* reply_msg); void OnReadImageReply(const SkBitmap& bitmap, IPC::Message* reply_msg); void OnReadCustomData(ui::ClipboardType clipboard_type, - const string16& type, - string16* result); + const base::string16& type, + base::string16* result); void OnReadData(const ui::Clipboard::FormatType& format, std::string* data); #if defined(OS_MACOSX) - void OnFindPboardWriteString(const string16& text); + void OnFindPboardWriteString(const base::string16& text); #endif // We have our own clipboard because we want to access the clipboard on the diff --git a/content/browser/renderer_host/clipboard_message_filter_mac.mm b/content/browser/renderer_host/clipboard_message_filter_mac.mm index ee8f5a3..3c59d31 100644 --- a/content/browser/renderer_host/clipboard_message_filter_mac.mm +++ b/content/browser/renderer_host/clipboard_message_filter_mac.mm @@ -40,7 +40,8 @@ class WriteFindPboardWrapper { } // namespace // Called on the IO thread. -void ClipboardMessageFilter::OnFindPboardWriteString(const string16& text) { +void ClipboardMessageFilter::OnFindPboardWriteString( + const base::string16& text) { if (text.length() <= kMaxFindPboardStringLength) { NSString* nsText = base::SysUTF16ToNSString(text); if (nsText) { diff --git a/content/browser/renderer_host/database_message_filter.cc b/content/browser/renderer_host/database_message_filter.cc index d41be65..55ea305 100644 --- a/content/browser/renderer_host/database_message_filter.cc +++ b/content/browser/renderer_host/database_message_filter.cc @@ -113,13 +113,14 @@ bool DatabaseMessageFilter::OnMessageReceived( DatabaseMessageFilter::~DatabaseMessageFilter() { } -void DatabaseMessageFilter::OnDatabaseOpenFile(const string16& vfs_file_name, - int desired_flags, - IPC::Message* reply_msg) { +void DatabaseMessageFilter::OnDatabaseOpenFile( + const base::string16& vfs_file_name, + int desired_flags, + IPC::Message* reply_msg) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); base::PlatformFile file_handle = base::kInvalidPlatformFileValue; std::string origin_identifier; - string16 database_name; + base::string16 database_name; // When in incognito mode, we want to make sure that all DB files are // removed when the incognito browser context goes away, so we add the @@ -162,16 +163,18 @@ void DatabaseMessageFilter::OnDatabaseOpenFile(const string16& vfs_file_name, Send(reply_msg); } -void DatabaseMessageFilter::OnDatabaseDeleteFile(const string16& vfs_file_name, - const bool& sync_dir, - IPC::Message* reply_msg) { +void DatabaseMessageFilter::OnDatabaseDeleteFile( + const base::string16& vfs_file_name, + const bool& sync_dir, + IPC::Message* reply_msg) { DatabaseDeleteFile(vfs_file_name, sync_dir, reply_msg, kNumDeleteRetries); } -void DatabaseMessageFilter::DatabaseDeleteFile(const string16& vfs_file_name, - bool sync_dir, - IPC::Message* reply_msg, - int reschedule_count) { +void DatabaseMessageFilter::DatabaseDeleteFile( + const base::string16& vfs_file_name, + bool sync_dir, + IPC::Message* reply_msg, + int reschedule_count) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Return an error if the file name is invalid or if the file could not @@ -183,8 +186,8 @@ void DatabaseMessageFilter::DatabaseDeleteFile(const string16& vfs_file_name, // In order to delete a journal file in incognito mode, we only need to // close the open handle to it that's stored in the database tracker. if (db_tracker_->IsIncognitoProfile()) { - const string16 wal_suffix(ASCIIToUTF16("-wal")); - string16 sqlite_suffix; + const base::string16 wal_suffix(ASCIIToUTF16("-wal")); + base::string16 sqlite_suffix; // WAL files can be deleted without having previously been opened. if (!db_tracker_->HasSavedIncognitoFileHandle(vfs_file_name) && @@ -215,7 +218,7 @@ void DatabaseMessageFilter::DatabaseDeleteFile(const string16& vfs_file_name, } void DatabaseMessageFilter::OnDatabaseGetFileAttributes( - const string16& vfs_file_name, + const base::string16& vfs_file_name, IPC::Message* reply_msg) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); int32 attributes = -1; @@ -230,7 +233,7 @@ void DatabaseMessageFilter::OnDatabaseGetFileAttributes( } void DatabaseMessageFilter::OnDatabaseGetFileSize( - const string16& vfs_file_name, IPC::Message* reply_msg) { + const base::string16& vfs_file_name, IPC::Message* reply_msg) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); int64 size = 0; base::FilePath db_file = @@ -278,8 +281,8 @@ void DatabaseMessageFilter::OnDatabaseGetUsageAndQuota( void DatabaseMessageFilter::OnDatabaseOpened( const std::string& origin_identifier, - const string16& database_name, - const string16& description, + const base::string16& database_name, + const base::string16& description, int64 estimated_size) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); @@ -299,7 +302,7 @@ void DatabaseMessageFilter::OnDatabaseOpened( void DatabaseMessageFilter::OnDatabaseModified( const std::string& origin_identifier, - const string16& database_name) { + const base::string16& database_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); if (!database_connections_.IsDatabaseOpened( origin_identifier, database_name)) { @@ -313,7 +316,7 @@ void DatabaseMessageFilter::OnDatabaseModified( void DatabaseMessageFilter::OnDatabaseClosed( const std::string& origin_identifier, - const string16& database_name) { + const base::string16& database_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); if (!database_connections_.IsDatabaseOpened( origin_identifier, database_name)) { @@ -328,7 +331,7 @@ void DatabaseMessageFilter::OnDatabaseClosed( void DatabaseMessageFilter::OnHandleSqliteError( const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int error) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); if (!DatabaseUtil::IsValidOriginIdentifier(origin_identifier)) { @@ -342,7 +345,7 @@ void DatabaseMessageFilter::OnHandleSqliteError( void DatabaseMessageFilter::OnDatabaseSizeChanged( const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int64 database_size) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); if (database_connections_.IsOriginUsed(origin_identifier)) { @@ -353,7 +356,7 @@ void DatabaseMessageFilter::OnDatabaseSizeChanged( void DatabaseMessageFilter::OnDatabaseScheduledForDeletion( const std::string& origin_identifier, - const string16& database_name) { + const base::string16& database_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); Send(new DatabaseMsg_CloseImmediately(origin_identifier, database_name)); } diff --git a/content/browser/renderer_host/database_message_filter.h b/content/browser/renderer_host/database_message_filter.h index 9e168c5..5024335 100644 --- a/content/browser/renderer_host/database_message_filter.h +++ b/content/browser/renderer_host/database_message_filter.h @@ -41,15 +41,15 @@ class DatabaseMessageFilter void RemoveObserver(); // VFS message handlers (file thread) - void OnDatabaseOpenFile(const string16& vfs_file_name, + void OnDatabaseOpenFile(const base::string16& vfs_file_name, int desired_flags, IPC::Message* reply_msg); - void OnDatabaseDeleteFile(const string16& vfs_file_name, + void OnDatabaseDeleteFile(const base::string16& vfs_file_name, const bool& sync_dir, IPC::Message* reply_msg); - void OnDatabaseGetFileAttributes(const string16& vfs_file_name, + void OnDatabaseGetFileAttributes(const base::string16& vfs_file_name, IPC::Message* reply_msg); - void OnDatabaseGetFileSize(const string16& vfs_file_name, + void OnDatabaseGetFileSize(const base::string16& vfs_file_name, IPC::Message* reply_msg); // Quota message handler (io thread) @@ -62,26 +62,26 @@ class DatabaseMessageFilter // Database tracker message handlers (file thread) void OnDatabaseOpened(const std::string& origin_identifier, - const string16& database_name, - const string16& description, + const base::string16& database_name, + const base::string16& description, int64 estimated_size); void OnDatabaseModified(const std::string& origin_identifier, - const string16& database_name); + const base::string16& database_name); void OnDatabaseClosed(const std::string& origin_identifier, - const string16& database_name); + const base::string16& database_name); void OnHandleSqliteError(const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int error); // DatabaseTracker::Observer callbacks (file thread) virtual void OnDatabaseSizeChanged(const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int64 database_size) OVERRIDE; virtual void OnDatabaseScheduledForDeletion( const std::string& origin_identifier, - const string16& database_name) OVERRIDE; + const base::string16& database_name) OVERRIDE; - void DatabaseDeleteFile(const string16& vfs_file_name, + void DatabaseDeleteFile(const base::string16& vfs_file_name, bool sync_dir, IPC::Message* reply_msg, int reschedule_count); diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc index 7ce6558..d4b7789 100644 --- a/content/browser/renderer_host/gtk_im_context_wrapper.cc +++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc @@ -477,7 +477,7 @@ void GtkIMContextWrapper::ConfirmComposition() { if (host_view_->GetRenderWidgetHost()) { RenderWidgetHostImpl::From( host_view_->GetRenderWidgetHost())->ImeConfirmComposition( - string16(), gfx::Range::InvalidRange(), false); + base::string16(), gfx::Range::InvalidRange(), false); } // Reset the input method. @@ -485,7 +485,7 @@ void GtkIMContextWrapper::ConfirmComposition() { } } -void GtkIMContextWrapper::HandleCommit(const string16& text) { +void GtkIMContextWrapper::HandleCommit(const base::string16& text) { if (suppress_next_commit_) return; diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.h b/content/browser/renderer_host/gtk_im_context_wrapper.h index 1647df1..8bd027f 100644 --- a/content/browser/renderer_host/gtk_im_context_wrapper.h +++ b/content/browser/renderer_host/gtk_im_context_wrapper.h @@ -75,7 +75,7 @@ class GtkIMContextWrapper { void ProcessInputMethodResult(const GdkEventKey* event, bool filtered); // Real code of "commit" signal handler. - void HandleCommit(const string16& text); + void HandleCommit(const base::string16& text); // Real code of "preedit-start" signal handler. void HandlePreeditStart(); @@ -180,7 +180,7 @@ class GtkIMContextWrapper { // Stores a copy of the most recent commit text received by commit signal // handler. - string16 commit_text_; + base::string16 commit_text_; // If it's true then the next "commit" signal will be suppressed. // It's only used to workaround http://crbug.com/50485. diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc index 9e7fe47..92d972f 100644 --- a/content/browser/renderer_host/ime_adapter_android.cc +++ b/content/browser/renderer_host/ime_adapter_android.cc @@ -136,7 +136,7 @@ void ImeAdapterAndroid::SetComposingText(JNIEnv* env, jobject, jstring text, if (!rwhi) return; - string16 text16 = ConvertJavaStringToUTF16(env, text); + base::string16 text16 = ConvertJavaStringToUTF16(env, text); std::vector<blink::WebCompositionUnderline> underlines; underlines.push_back( blink::WebCompositionUnderline(0, text16.length(), SK_ColorBLACK, @@ -155,7 +155,7 @@ void ImeAdapterAndroid::CommitText(JNIEnv* env, jobject, jstring text) { if (!rwhi) return; - string16 text16 = ConvertJavaStringToUTF16(env, text); + base::string16 text16 = ConvertJavaStringToUTF16(env, text); rwhi->ImeConfirmComposition(text16, gfx::Range::InvalidRange(), false); } @@ -164,7 +164,8 @@ void ImeAdapterAndroid::FinishComposingText(JNIEnv* env, jobject) { if (!rwhi) return; - rwhi->ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), true); + rwhi->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(), + true); } void ImeAdapterAndroid::AttachImeAdapter(JNIEnv* env, jobject java_object) { diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc index 6d792e7..562517a 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc @@ -59,7 +59,7 @@ JavaBridgeDispatcherHost::~JavaBridgeDispatcherHost() { base::Bind(&CleanUpStubs, stubs_)); } -void JavaBridgeDispatcherHost::AddNamedObject(const string16& name, +void JavaBridgeDispatcherHost::AddNamedObject(const base::string16& name, NPObject* object) { NPVariant_Param variant_param; CreateNPVariantParam(object, &variant_param); @@ -68,7 +68,7 @@ void JavaBridgeDispatcherHost::AddNamedObject(const string16& name, render_view_host_->GetRoutingID(), name, variant_param)); } -void JavaBridgeDispatcherHost::RemoveNamedObject(const string16& name) { +void JavaBridgeDispatcherHost::RemoveNamedObject(const base::string16& name) { // On receipt of this message, the JavaBridgeDispatcher will drop its // reference to the corresponding proxy object. When the last reference is // removed, the proxy object will delete its NPObjectProxy, which will cause diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host.h b/content/browser/renderer_host/java/java_bridge_dispatcher_host.h index 94ee632..21e47c0 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host.h +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host.h @@ -42,8 +42,8 @@ class JavaBridgeDispatcherHost // to |object|, which is manipulated on the background thread. This class // holds a reference to |object| for the time that the proxy object is bound // to the window object. - void AddNamedObject(const string16& name, NPObject* object); - void RemoveNamedObject(const string16& name); + void AddNamedObject(const base::string16& name, NPObject* object); + void RemoveNamedObject(const base::string16& name); // Since this object is ref-counted, it might outlive render_view_host_. void RenderViewDeleted(); diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc index f06d9fe..02cf4dc 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc @@ -31,7 +31,7 @@ JavaBridgeDispatcherHostManager::~JavaBridgeDispatcherHostManager() { DCHECK_EQ(0U, instances_.size()); } -void JavaBridgeDispatcherHostManager::AddNamedObject(const string16& name, +void JavaBridgeDispatcherHostManager::AddNamedObject(const base::string16& name, NPObject* object) { // Record this object in a map so that we can add it into RenderViewHosts // created later. The JavaBridgeDispatcherHost instances will take a @@ -67,7 +67,8 @@ void JavaBridgeDispatcherHostManager::SetRetainedObjectSet( } } -void JavaBridgeDispatcherHostManager::RemoveNamedObject(const string16& name) { +void JavaBridgeDispatcherHostManager::RemoveNamedObject( + const base::string16& name) { ObjectMap::iterator iter = objects_.find(name); if (iter == objects_.end()) { return; diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h index e3d629a..29523b5 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h @@ -34,8 +34,8 @@ class JavaBridgeDispatcherHostManager // These methods add or remove the object to each JavaBridgeDispatcherHost. // Each one holds a reference to the NPObject while the object is bound to // the corresponding RenderView. See JavaBridgeDispatcherHost for details. - void AddNamedObject(const string16& name, NPObject* object); - void RemoveNamedObject(const string16& name); + void AddNamedObject(const base::string16& name, NPObject* object); + void RemoveNamedObject(const base::string16& name); void OnGetChannelHandle(RenderViewHost* render_view_host, IPC::Message* reply_msg); @@ -60,7 +60,7 @@ class JavaBridgeDispatcherHostManager typedef std::map<RenderViewHost*, scoped_refptr<JavaBridgeDispatcherHost> > InstanceMap; InstanceMap instances_; - typedef std::map<string16, NPObject*> ObjectMap; + typedef std::map<base::string16, NPObject*> ObjectMap; ObjectMap objects_; JavaObjectWeakGlobalRef retained_object_set_; diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc index e5cdcc6..3530e1e 100644 --- a/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc +++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc @@ -73,7 +73,7 @@ void GetFontsInFamily_SlowBlocking(const std::string& family, LOGFONTW logfont; memset(&logfont, 0, sizeof(logfont)); logfont.lfCharSet = DEFAULT_CHARSET; - string16 family16 = UTF8ToUTF16(family); + base::string16 family16 = UTF8ToUTF16(family); memcpy(&logfont.lfFaceName, &family16[0], sizeof(logfont.lfFaceName)); base::win::ScopedCreateDC hdc(::CreateCompatibleDC(NULL)); ::EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW)&EnumFontsInFamilyProc, diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 3aca534..10a3901 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -843,7 +843,7 @@ void RenderMessageFilter::OnGetMonitorColorProfile(std::vector<char>* profile) { void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, const GURL& url, const Referrer& referrer, - const string16& suggested_name) { + const base::string16& suggested_name) { scoped_ptr<DownloadSaveInfo> save_info(new DownloadSaveInfo()); save_info->suggested_name = suggested_name; scoped_ptr<net::URLRequest> request( @@ -1112,7 +1112,7 @@ void RenderMessageFilter::OnDidLose3DContext( #if defined(OS_WIN) void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font, - const string16& str) { + const base::string16& str) { // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too. // Except that for True Type fonts, // GetTextMetrics will not load the font in memory. diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index 526849e..23483a4 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -156,7 +156,7 @@ class RenderMessageFilter : public BrowserMessageFilter { #if defined(OS_WIN) void OnPreCacheFontCharacters(const LOGFONT& log_font, - const string16& characters); + const base::string16& characters); #endif void OnGetPlugins(bool refresh, IPC::Message* reply_msg); @@ -190,7 +190,7 @@ class RenderMessageFilter : public BrowserMessageFilter { void OnDownloadUrl(const IPC::Message& message, const GURL& url, const Referrer& referrer, - const string16& suggested_name); + const base::string16& suggested_name); void OnCheckNotificationPermission(const GURL& source_origin, int* permission_level); diff --git a/content/browser/renderer_host/render_view_host_delegate.cc b/content/browser/renderer_host/render_view_host_delegate.cc index d7b8ba5..4786909 100644 --- a/content/browser/renderer_host/render_view_host_delegate.cc +++ b/content/browser/renderer_host/render_view_host_delegate.cc @@ -24,8 +24,8 @@ bool RenderViewHostDelegate::OnMessageReceived(RenderViewHost* render_view_host, } bool RenderViewHostDelegate::AddMessageToConsole( - int32 level, const string16& message, int32 line_no, - const string16& source_id) { + int32 level, const base::string16& message, int32 line_no, + const base::string16& source_id) { return false; } diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h index f3bf8aa..e5fa672 100644 --- a/content/browser/renderer_host/render_view_host_delegate.h +++ b/content/browser/renderer_host/render_view_host_delegate.h @@ -195,7 +195,7 @@ class CONTENT_EXPORT RenderViewHostDelegate { // The page's title was changed and should be updated. virtual void UpdateTitle(RenderViewHost* render_view_host, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) {} // The page's encoding was changed and should be updated. @@ -281,23 +281,23 @@ class CONTENT_EXPORT RenderViewHostDelegate { // A javascript message, confirmation or prompt should be shown. virtual void RunJavaScriptMessage(RenderViewHost* rvh, - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType type, IPC::Message* reply_msg, bool* did_suppress_message) {} virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) {} // A message was added to to the console. virtual bool AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id); + const base::string16& source_id); // Return a dummy RendererPreferences object that will be used by the renderer // associated with the owning RenderViewHost. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index 92d4fa5..6382706 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -243,7 +243,7 @@ SiteInstance* RenderViewHostImpl::GetSiteInstance() const { } bool RenderViewHostImpl::CreateRenderView( - const string16& frame_name, + const base::string16& frame_name, int opener_route_id, int32 max_page_id) { TRACE_EVENT0("renderer_host", "RenderViewHostImpl::CreateRenderView"); @@ -948,8 +948,9 @@ void RenderViewHostImpl::DesktopNotificationPostDisplay(int callback_context) { callback_context)); } -void RenderViewHostImpl::DesktopNotificationPostError(int notification_id, - const string16& message) { +void RenderViewHostImpl::DesktopNotificationPostError( + int notification_id, + const base::string16& message) { Send(new DesktopNotificationMsg_PostError( GetRoutingID(), notification_id, message)); } @@ -965,15 +966,15 @@ void RenderViewHostImpl::DesktopNotificationPostClick(int notification_id) { } void RenderViewHostImpl::ExecuteJavascriptInWebFrame( - const string16& frame_xpath, - const string16& jscript) { + const base::string16& frame_xpath, + const base::string16& jscript) { Send(new ViewMsg_ScriptEvalRequest(GetRoutingID(), frame_xpath, jscript, 0, false)); } void RenderViewHostImpl::ExecuteJavascriptInWebFrameCallbackResult( - const string16& frame_xpath, - const string16& jscript, + const base::string16& frame_xpath, + const base::string16& jscript, const JavascriptResultCallback& callback) { static int next_id = 1; int key = next_id++; @@ -982,9 +983,10 @@ void RenderViewHostImpl::ExecuteJavascriptInWebFrameCallbackResult( javascript_callbacks_.insert(std::make_pair(key, callback)); } -void RenderViewHostImpl::JavaScriptDialogClosed(IPC::Message* reply_msg, - bool success, - const string16& user_input) { +void RenderViewHostImpl::JavaScriptDialogClosed( + IPC::Message* reply_msg, + bool success, + const base::string16& user_input) { GetProcess()->SetIgnoreInputEvents(false); bool is_waiting = is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_; @@ -1535,7 +1537,7 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) { void RenderViewHostImpl::OnUpdateTitle( int32 page_id, - const string16& title, + const base::string16& title, blink::WebTextDirection title_direction) { if (title.length() > kMaxTitleChars) { NOTREACHED() << "Renderer sent too many characters in title."; @@ -1669,7 +1671,7 @@ void RenderViewHostImpl::OnDidChangeScrollOffsetPinningForMainFrame( void RenderViewHostImpl::OnDidChangeNumWheelEvents(int count) { } -void RenderViewHostImpl::OnSelectionChanged(const string16& text, +void RenderViewHostImpl::OnSelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { if (view_) @@ -1695,8 +1697,8 @@ void RenderViewHostImpl::OnRouteMessageEvent( } void RenderViewHostImpl::OnRunJavaScriptMessage( - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType type, IPC::Message* reply_msg) { @@ -1710,7 +1712,7 @@ void RenderViewHostImpl::OnRunJavaScriptMessage( } void RenderViewHostImpl::OnRunBeforeUnloadConfirm(const GURL& frame_url, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) { // While a JS before unload dialog is showing, tabs in the same process @@ -1789,9 +1791,9 @@ void RenderViewHostImpl::OnFocusedNodeChanged(bool is_editable_node) { void RenderViewHostImpl::OnAddMessageToConsole( int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) return; @@ -2076,12 +2078,12 @@ void RenderViewHostImpl::ReloadFrame() { } void RenderViewHostImpl::Find(int request_id, - const string16& search_text, + const base::string16& search_text, const blink::WebFindOptions& options) { Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); } -void RenderViewHostImpl::InsertCSS(const string16& frame_xpath, +void RenderViewHostImpl::InsertCSS(const base::string16& frame_xpath, const std::string& css) { Send(new ViewMsg_CSSInsertRequest(GetRoutingID(), frame_xpath, css)); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h index 424a787..6e02571 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -133,8 +133,9 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void DesktopNotificationPermissionRequestDone( int callback_context) OVERRIDE; virtual void DesktopNotificationPostDisplay(int callback_context) OVERRIDE; - virtual void DesktopNotificationPostError(int notification_id, - const string16& message) OVERRIDE; + virtual void DesktopNotificationPostError( + int notification_id, + const base::string16& message) OVERRIDE; virtual void DesktopNotificationPostClose(int notification_id, bool by_user) OVERRIDE; virtual void DesktopNotificationPostClick(int notification_id) OVERRIDE; @@ -172,17 +173,18 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void ExecuteMediaPlayerActionAtLocation( const gfx::Point& location, const blink::WebMediaPlayerAction& action) OVERRIDE; - virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, - const string16& jscript) OVERRIDE; + virtual void ExecuteJavascriptInWebFrame( + const base::string16& frame_xpath, + const base::string16& jscript) OVERRIDE; virtual void ExecuteJavascriptInWebFrameCallbackResult( - const string16& frame_xpath, - const string16& jscript, + const base::string16& frame_xpath, + const base::string16& jscript, const JavascriptResultCallback& callback) OVERRIDE; virtual void ExecutePluginActionAtLocation( const gfx::Point& location, const blink::WebPluginAction& action) OVERRIDE; virtual void ExitFullscreen() OVERRIDE; - virtual void Find(int request_id, const string16& search_text, + virtual void Find(int request_id, const base::string16& search_text, const blink::WebFindOptions& options) OVERRIDE; virtual void StopFinding(StopFindAction action) OVERRIDE; virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE; @@ -192,7 +194,7 @@ class CONTENT_EXPORT RenderViewHostImpl virtual RenderViewHostDelegate* GetDelegate() const OVERRIDE; virtual int GetEnabledBindings() const OVERRIDE; virtual SiteInstance* GetSiteInstance() const OVERRIDE; - virtual void InsertCSS(const string16& frame_xpath, + virtual void InsertCSS(const base::string16& frame_xpath, const std::string& css) OVERRIDE; virtual bool IsRenderViewLive() const OVERRIDE; virtual bool IsSubframe() const OVERRIDE; @@ -233,7 +235,7 @@ class CONTENT_EXPORT RenderViewHostImpl // The |opener_route_id| parameter indicates which RenderView created this // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the // RenderView is told to start issuing page IDs at |max_page_id| + 1. - virtual bool CreateRenderView(const string16& frame_name, + virtual bool CreateRenderView(const base::string16& frame_name, int opener_route_id, int32 max_page_id); @@ -348,7 +350,7 @@ class CONTENT_EXPORT RenderViewHostImpl // closed by the user. void JavaScriptDialogClosed(IPC::Message* reply_msg, bool success, - const string16& user_input); + const base::string16& user_input); // Tells the renderer view to focus the first (last if reverse is true) node. void SetInitialFocus(bool reverse); @@ -534,7 +536,7 @@ class CONTENT_EXPORT RenderViewHostImpl void OnNavigate(const IPC::Message& msg); void OnUpdateState(int32 page_id, const PageState& state); void OnUpdateTitle(int32 page_id, - const string16& title, + const base::string16& title, blink::WebTextDirection title_direction); void OnUpdateEncoding(const std::string& encoding); void OnUpdateTargetURL(int32 page_id, const GURL& url); @@ -556,7 +558,7 @@ class CONTENT_EXPORT RenderViewHostImpl void OnDidChangeScrollOffsetPinningForMainFrame(bool is_pinned_to_left, bool is_pinned_to_right); void OnDidChangeNumWheelEvents(int count); - void OnSelectionChanged(const string16& text, + void OnSelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range); void OnSelectionBoundsChanged( @@ -564,13 +566,13 @@ class CONTENT_EXPORT RenderViewHostImpl void OnPasteFromSelectionClipboard(); void OnRouteCloseEvent(); void OnRouteMessageEvent(const ViewMsg_PostMessage_Params& params); - void OnRunJavaScriptMessage(const string16& message, - const string16& default_prompt, + void OnRunJavaScriptMessage(const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType type, IPC::Message* reply_msg); void OnRunBeforeUnloadConfirm(const GURL& frame_url, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg); void OnStartDragging(const DropData& drop_data, @@ -583,9 +585,9 @@ class CONTENT_EXPORT RenderViewHostImpl void OnTakeFocus(bool reverse); void OnFocusedNodeChanged(bool is_editable_node); void OnAddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id); + const base::string16& source_id); void OnUpdateInspectorSetting(const std::string& key, const std::string& value); void OnShouldCloseACK( diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc index 67e08d2..3196097 100644 --- a/content/browser/renderer_host/render_view_host_unittest.cc +++ b/content/browser/renderer_host/render_view_host_unittest.cc @@ -199,7 +199,7 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) { GURL sensitive_file_url = net::FilePathToFileURL(sensitive_file_path); dropped_data.url = highlighted_file_url; dropped_data.filenames.push_back(DropData::FileInfo( - UTF8ToUTF16(dragged_file_path.AsUTF8Unsafe()), string16())); + UTF8ToUTF16(dragged_file_path.AsUTF8Unsafe()), base::string16())); rvh()->DragTargetDragEnter(dropped_data, client_point, screen_point, blink::WebDragOperationNone, 0); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 9cb8922..c792a6d 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -1321,7 +1321,7 @@ void RenderWidgetHostImpl::CandidateWindowHidden() { } void RenderWidgetHostImpl::ImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { @@ -1330,7 +1330,7 @@ void RenderWidgetHostImpl::ImeSetComposition( } void RenderWidgetHostImpl::ImeConfirmComposition( - const string16& text, + const base::string16& text, const gfx::Range& replacement_range, bool keep_selection) { Send(new ViewMsg_ImeConfirmComposition( @@ -1338,7 +1338,7 @@ void RenderWidgetHostImpl::ImeConfirmComposition( } void RenderWidgetHostImpl::ImeCancelComposition() { - Send(new ViewMsg_ImeSetComposition(GetRoutingID(), string16(), + Send(new ViewMsg_ImeSetComposition(GetRoutingID(), base::string16(), std::vector<blink::WebCompositionUnderline>(), 0, 0)); } @@ -1442,7 +1442,7 @@ void RenderWidgetHostImpl::OnClose() { } void RenderWidgetHostImpl::OnSetTooltipText( - const string16& tooltip_text, + const base::string16& tooltip_text, WebTextDirection text_direction_hint) { // First, add directionality marks around tooltip text if necessary. // A naive solution would be to simply always wrap the text. However, on @@ -1457,7 +1457,7 @@ void RenderWidgetHostImpl::OnSetTooltipText( // trying to detect the directionality from the tooltip text rather than the // element direction. One could argue that would be a preferable solution // but we use the current approach to match Fx & IE's behavior. - string16 wrapped_tooltip_text = tooltip_text; + base::string16 wrapped_tooltip_text = tooltip_text; if (!tooltip_text.empty()) { if (text_direction_hint == blink::WebTextDirectionLeftToRight) { // Force the tooltip to have LTR directionality. @@ -1935,11 +1935,11 @@ void RenderWidgetHostImpl::ScrollBackingStoreRect(const gfx::Vector2d& delta, backing_store->ScrollBackingStore(delta, clip_rect, view_size); } -void RenderWidgetHostImpl::Replace(const string16& word) { +void RenderWidgetHostImpl::Replace(const base::string16& word) { Send(new InputMsg_Replace(routing_id_, word)); } -void RenderWidgetHostImpl::ReplaceMisspelling(const string16& word) { +void RenderWidgetHostImpl::ReplaceMisspelling(const base::string16& word) { Send(new InputMsg_ReplaceMisspelling(routing_id_, word)); } diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index 66e2e9a..9b94a44 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -164,8 +164,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, int tag, const gfx::Size& page_size, const gfx::Size& desired_size) OVERRIDE; - virtual void Replace(const string16& word) OVERRIDE; - virtual void ReplaceMisspelling(const string16& word) OVERRIDE; + virtual void Replace(const base::string16& word) OVERRIDE; + virtual void ReplaceMisspelling(const base::string16& word) OVERRIDE; virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; virtual void RestartHangMonitorTimeout() OVERRIDE; virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; @@ -333,7 +333,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // * when it receives a "preedit_changed" signal of GtkIMContext (on Linux); // * when markedText of NSTextInput is called (on Mac). void ImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); @@ -344,7 +344,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // (on Windows); // * when it receives a "commit" signal of GtkIMContext (on Linux); // * when insertText of NSTextInput is called (on Mac). - void ImeConfirmComposition(const string16& text, + void ImeConfirmComposition(const base::string16& text, const gfx::Range& replacement_range, bool keep_selection); @@ -651,7 +651,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, void OnClose(); void OnUpdateScreenRectsAck(); void OnRequestMove(const gfx::Rect& pos); - void OnSetTooltipText(const string16& tooltip_text, + void OnSetTooltipText(const base::string16& tooltip_text, blink::WebTextDirection text_direction_hint); void OnPaintAtSizeAck(int tag, const gfx::Size& size); #if defined(OS_MACOSX) diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index c8c559b..0c79dbd 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -524,11 +524,11 @@ void RenderWidgetHostViewAndroid::Destroy() { } void RenderWidgetHostViewAndroid::SetTooltipText( - const string16& tooltip_text) { + const base::string16& tooltip_text) { // Tooltips don't makes sense on Android. } -void RenderWidgetHostViewAndroid::SelectionChanged(const string16& text, +void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { RenderWidgetHostViewBase::SelectionChanged(text, offset, range); diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index c01120f..537b87b 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h @@ -112,8 +112,8 @@ class RenderWidgetHostViewAndroid virtual void RenderProcessGone(base::TerminationStatus status, int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SelectionBoundsChanged( diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index de6c1ed..27db1a4 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -990,7 +990,8 @@ void RenderWidgetHostViewAura::Destroy() { delete window_; } -void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { +void RenderWidgetHostViewAura::SetTooltipText( + const base::string16& tooltip_text) { tooltip_ = tooltip_text; aura::Window* root_window = window_->GetRootWindow(); aura::client::TooltipClient* tooltip_client = @@ -1002,7 +1003,7 @@ void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { } } -void RenderWidgetHostViewAura::SelectionChanged(const string16& text, +void RenderWidgetHostViewAura::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { RenderWidgetHostViewBase::SelectionChanged(text, offset, range); @@ -2180,8 +2181,10 @@ void RenderWidgetHostViewAura::SetCompositionText( } void RenderWidgetHostViewAura::ConfirmCompositionText() { - if (host_ && has_composition_text_) - host_->ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false); + if (host_ && has_composition_text_) { + host_->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(), + false); + } has_composition_text_ = false; } @@ -2191,7 +2194,7 @@ void RenderWidgetHostViewAura::ClearCompositionText() { has_composition_text_ = false; } -void RenderWidgetHostViewAura::InsertText(const string16& text) { +void RenderWidgetHostViewAura::InsertText(const base::string16& text) { DCHECK(text_input_type_ != ui::TEXT_INPUT_TYPE_NONE); if (host_) host_->ImeConfirmComposition(text, gfx::Range::InvalidRange(), false); @@ -2326,7 +2329,7 @@ bool RenderWidgetHostViewAura::DeleteRange(const gfx::Range& range) { bool RenderWidgetHostViewAura::GetTextFromRange( const gfx::Range& range, - string16* text) const { + base::string16* text) const { gfx::Range selection_text_range(selection_text_offset_, selection_text_offset_ + selection_text_.length()); @@ -3252,8 +3255,10 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { void RenderWidgetHostViewAura::FinishImeCompositionSession() { if (!has_composition_text_) return; - if (host_) - host_->ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false); + if (host_) { + host_->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(), + false); + } ImeCancelComposition(); } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 385495a..569209b 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -192,8 +192,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual void RenderProcessGone(base::TerminationStatus status, int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SelectionBoundsChanged( @@ -258,7 +258,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura const ui::CompositionText& composition) OVERRIDE; virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; - virtual void InsertText(const string16& text) OVERRIDE; + virtual void InsertText(const base::string16& text) OVERRIDE; virtual void InsertChar(char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; @@ -274,7 +274,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; virtual bool GetTextFromRange(const gfx::Range& range, - string16* text) const OVERRIDE; + base::string16* text) const OVERRIDE; virtual void OnInputMethodChanged() OVERRIDE; virtual bool ChangeTextDirectionAndLayoutAlignment( base::i18n::TextDirection direction) OVERRIDE; @@ -619,7 +619,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura bool accept_return_character_; // Current tooltip text. - string16 tooltip_; + base::string16 tooltip_; std::vector<base::Closure> on_compositing_did_commit_callbacks_; diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index b96182c..8347b6d 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -118,7 +118,7 @@ LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message, bool IsPluginWrapperWindow(HWND window) { return gfx::GetClassNameW(window) == - string16(kWrapperNativeWindowClassName); + base::string16(kWrapperNativeWindowClassName); } // Create an intermediate window between the given HWND and its parent. @@ -421,7 +421,7 @@ float RenderWidgetHostViewBase::GetOverdrawBottomHeight() const { return 0.f; } -void RenderWidgetHostViewBase::SelectionChanged(const string16& text, +void RenderWidgetHostViewBase::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { selection_text_ = text; @@ -439,9 +439,9 @@ void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { showing_context_menu_ = showing; } -string16 RenderWidgetHostViewBase::GetSelectedText() const { +base::string16 RenderWidgetHostViewBase::GetSelectedText() const { if (!selection_range_.IsValid()) - return string16(); + return base::string16(); return selection_text_.substr( selection_range_.GetMin() - selection_text_offset_, selection_range_.length()); diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 0a6fd1a..eadf92b 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -47,7 +47,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // RenderWidgetHostViewPort implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SetBackground(const SkBitmap& background) OVERRIDE; @@ -56,7 +56,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase virtual float GetOverdrawBottomHeight() const OVERRIDE; virtual bool IsShowingContextMenu() const OVERRIDE; virtual void SetShowingContextMenu(bool showing_menu) OVERRIDE; - virtual string16 GetSelectedText() const OVERRIDE; + virtual base::string16 GetSelectedText() const OVERRIDE; virtual bool IsMouseLocked() OVERRIDE; virtual void UnhandledWheelEvent( const blink::WebMouseWheelEvent& event) OVERRIDE; @@ -140,7 +140,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool showing_context_menu_; // A buffer containing the text inside and around the current selection range. - string16 selection_text_; + base::string16 selection_text_; // The offset of the text stored in |selection_text_| relative to the start of // the web page. diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc index 494ba38..18d3180 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc @@ -929,14 +929,15 @@ void RenderWidgetHostViewGtk::Destroy() { base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); } -void RenderWidgetHostViewGtk::SetTooltipText(const string16& tooltip_text) { +void RenderWidgetHostViewGtk::SetTooltipText( + const base::string16& tooltip_text) { // Maximum number of characters we allow in a tooltip. const int kMaxTooltipLength = 8 << 10; // Clamp the tooltip length to kMaxTooltipLength so that we don't // accidentally DOS the user with a mega tooltip (since GTK doesn't do // this itself). // I filed https://bugzilla.gnome.org/show_bug.cgi?id=604641 upstream. - const string16 clamped_tooltip = + const base::string16 clamped_tooltip = gfx::TruncateString(tooltip_text, kMaxTooltipLength); if (clamped_tooltip.empty()) { @@ -947,7 +948,7 @@ void RenderWidgetHostViewGtk::SetTooltipText(const string16& tooltip_text) { } } -void RenderWidgetHostViewGtk::SelectionChanged(const string16& text, +void RenderWidgetHostViewGtk::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { RenderWidgetHostViewBase::SelectionChanged(text, offset, range); @@ -1347,7 +1348,7 @@ bool RenderWidgetHostViewGtk::LockMouse() { } // Clear the tooltip window. - SetTooltipText(string16()); + SetTooltipText(base::string16()); // Ensure that the widget center location will be relevant for this mouse // lock session. It is updated whenever the window geometry moves @@ -1411,7 +1412,7 @@ bool RenderWidgetHostViewGtk::RetrieveSurrounding(std::string* text, *text = base::UTF16ToUTF8AndAdjustOffset( base::StringPiece16(selection_text_), &offset); - if (offset == string16::npos) { + if (offset == base::string16::npos) { NOTREACHED() << "Invalid offset in UTF16 string."; return false; } diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h index 9bb2755..e01181a 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.h +++ b/content/browser/renderer_host/render_widget_host_view_gtk.h @@ -93,8 +93,8 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {} - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SelectionBoundsChanged( diff --git a/content/browser/renderer_host/render_widget_host_view_guest.cc b/content/browser/renderer_host/render_widget_host_view_guest.cc index 6299384..49562c8 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.cc +++ b/content/browser/renderer_host/render_widget_host_view_guest.cc @@ -169,7 +169,8 @@ void RenderWidgetHostViewGuest::Destroy() { platform_view_->Destroy(); } -void RenderWidgetHostViewGuest::SetTooltipText(const string16& tooltip_text) { +void RenderWidgetHostViewGuest::SetTooltipText( + const base::string16& tooltip_text) { platform_view_->SetTooltipText(tooltip_text); } @@ -324,7 +325,7 @@ void RenderWidgetHostViewGuest::DidUpdateBackingStore( NOTREACHED(); } -void RenderWidgetHostViewGuest::SelectionChanged(const string16& text, +void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { platform_view_->SelectionChanged(text, offset, range); diff --git a/content/browser/renderer_host/render_widget_host_view_guest.h b/content/browser/renderer_host/render_widget_host_view_guest.h index e406b50..ac9fa0e 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.h +++ b/content/browser/renderer_host/render_widget_host_view_guest.h @@ -98,8 +98,8 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {} - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SelectionBoundsChanged( diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index 4a667b0..ffacd53 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -108,10 +108,10 @@ class RenderWidgetHostViewMacEditCommandHelper; NSRange selectedRange_; // Text to be inserted which was generated by handling a key down event. - string16 textToBeInserted_; + base::string16 textToBeInserted_; // Marked text which was generated by handling a key down event. - string16 markedText_; + base::string16 markedText_; // Underline information of the |markedText_|. std::vector<blink::WebCompositionUnderline> underlines_; @@ -264,8 +264,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, virtual void RenderProcessGone(base::TerminationStatus status, int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const string16& text, + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) OVERRIDE; virtual void SelectionBoundsChanged( @@ -338,7 +338,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, void EnableCoreAnimation(); // Sends completed plugin IME notification and text back to the renderer. - void PluginImeCompositionCompleted(const string16& text, int plugin_id); + void PluginImeCompositionCompleted(const base::string16& text, int plugin_id); const std::string& selected_text() const { return selected_text_; } @@ -526,7 +526,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, bool is_loading_; // The text to be shown in the tooltip, supplied by the renderer. - string16 tooltip_text_; + base::string16 tooltip_text_; // Factory used to safely scope delayed calls to ShutdownHost(). base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index b23b5d0..0069e73 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -1019,7 +1019,8 @@ void RenderWidgetHostViewMac::Destroy() { // Called from the renderer to tell us what the tooltip text should be. It // calls us frequently so we need to cache the value to prevent doing a lot // of repeat work. -void RenderWidgetHostViewMac::SetTooltipText(const string16& tooltip_text) { +void RenderWidgetHostViewMac::SetTooltipText( + const base::string16& tooltip_text) { if (tooltip_text != tooltip_text_ && [[cocoa_view_ window] isKeyWindow]) { tooltip_text_ = tooltip_text; @@ -1027,7 +1028,7 @@ void RenderWidgetHostViewMac::SetTooltipText(const string16& tooltip_text) { // Windows; we're just trying to be polite. Don't persist the trimmed // string, as then the comparison above will always fail and we'll try to // set it again every single time the mouse moves. - string16 display_text = tooltip_text_; + base::string16 display_text = tooltip_text_; if (tooltip_text_.length() > kMaxTooltipLength) display_text = tooltip_text_.substr(0, kMaxTooltipLength); @@ -1060,7 +1061,7 @@ void RenderWidgetHostViewMac::StopSpeaking() { // RenderWidgetHostViewCocoa uses the stored selection text, // which implements NSServicesRequests protocol. // -void RenderWidgetHostViewMac::SelectionChanged(const string16& text, +void RenderWidgetHostViewMac::SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) { if (range.is_empty() || text.empty()) { @@ -1245,7 +1246,7 @@ bool RenderWidgetHostViewMac::PostProcessEventForPluginIme( } void RenderWidgetHostViewMac::PluginImeCompositionCompleted( - const string16& text, int plugin_id) { + const base::string16& text, int plugin_id) { if (render_widget_host_) { render_widget_host_->Send(new ViewMsg_PluginImeCompositionCompleted( render_widget_host_->GetRoutingID(), text, plugin_id)); @@ -1745,7 +1746,7 @@ bool RenderWidgetHostViewMac::LockMouse() { [NSCursor hide]; // Clear the tooltip window. - SetTooltipText(string16()); + SetTooltipText(base::string16()); return true; } @@ -2399,7 +2400,7 @@ void RenderWidgetHostViewMac::FrameSwapped() { } else if (oldHasMarkedText && !hasMarkedText_ && !textInserted) { if (unmarkTextCalled_) { widgetHost->ImeConfirmComposition( - string16(), gfx::Range::InvalidRange(), false); + base::string16(), gfx::Range::InvalidRange(), false); } else { widgetHost->ImeCancelComposition(); } @@ -3512,7 +3513,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName; // called in keyEvent: method. if (!handlingKeyDown_) { renderWidgetHostView_->render_widget_host_->ImeConfirmComposition( - string16(), gfx::Range::InvalidRange(), false); + base::string16(), gfx::Range::InvalidRange(), false); } else { unmarkTextCalled_ = YES; } @@ -3750,7 +3751,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName; if (renderWidgetHostView_->render_widget_host_) renderWidgetHostView_->render_widget_host_->ImeConfirmComposition( - string16(), gfx::Range::InvalidRange(), false); + base::string16(), gfx::Range::InvalidRange(), false); [self cancelComposition]; } @@ -3763,7 +3764,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName; if (!active) { [[ComplexTextInputPanel sharedComplexTextInputPanel] cancelComposition]; renderWidgetHostView_->PluginImeCompositionCompleted( - string16(), focusedPluginIdentifier_); + base::string16(), focusedPluginIdentifier_); } } @@ -3798,7 +3799,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName; if (pluginImeActive_ && ![[ComplexTextInputPanel sharedComplexTextInputPanel] inComposition]) { renderWidgetHostView_->PluginImeCompositionCompleted( - string16(), focusedPluginIdentifier_); + base::string16(), focusedPluginIdentifier_); pluginImeActive_ = NO; } } diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm index ad37bfd..0a4b795 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm @@ -318,7 +318,7 @@ TEST_F(RenderWidgetHostViewMacTest, AcceleratorDestroy) { } TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) { - const string16 kDummyString = UTF8ToUTF16("hogehoge"); + const base::string16 kDummyString = UTF8ToUTF16("hogehoge"); const size_t kDummyOffset = 0; gfx::Rect caret_rect(10, 11, 0, 10); diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index c07a989..8238a82 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -836,14 +836,15 @@ void RenderWidgetHostViewWin::Destroy() { DestroyWindow(); } -void RenderWidgetHostViewWin::SetTooltipText(const string16& tooltip_text) { +void RenderWidgetHostViewWin::SetTooltipText( + const base::string16& tooltip_text) { if (!render_widget_host_->is_hidden()) EnsureTooltip(); // Clamp the tooltip length to kMaxTooltipLength so that we don't // accidentally DOS the user with a mega tooltip (since Windows doesn't seem // to do this itself). - const string16 new_tooltip_text = + const base::string16 new_tooltip_text = gfx::TruncateString(tooltip_text, kMaxTooltipLength); if (new_tooltip_text != tooltip_text_) { @@ -1017,7 +1018,7 @@ void RenderWidgetHostViewWin::ClearCompositionText() { NOTIMPLEMENTED(); } -void RenderWidgetHostViewWin::InsertText(const string16& text) { +void RenderWidgetHostViewWin::InsertText(const base::string16& text) { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return; @@ -1153,7 +1154,7 @@ bool RenderWidgetHostViewWin::DeleteRange(const gfx::Range& range) { } bool RenderWidgetHostViewWin::GetTextFromRange(const gfx::Range& range, - string16* text) const { + base::string16* text) const { if (!base::win::IsTSFAwareRequired()) { NOTREACHED(); return false; diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h index 72b22aa..b9a87bf 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.h +++ b/content/browser/renderer_host/render_widget_host_view_win.h @@ -202,7 +202,7 @@ class RenderWidgetHostViewWin // called by WebContentsImpl before DestroyWindow virtual void WillWmDestroy() OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; virtual void CopyFromCompositingSurface( const gfx::Rect& src_subrect, @@ -270,7 +270,7 @@ class RenderWidgetHostViewWin const ui::CompositionText& composition) OVERRIDE; virtual void ConfirmCompositionText() OVERRIDE; virtual void ClearCompositionText() OVERRIDE; - virtual void InsertText(const string16& text) OVERRIDE; + virtual void InsertText(const base::string16& text) OVERRIDE; virtual void InsertChar(char16 ch, int flags) OVERRIDE; virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; virtual ui::TextInputType GetTextInputType() const OVERRIDE; @@ -286,7 +286,7 @@ class RenderWidgetHostViewWin virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; virtual bool GetTextFromRange(const gfx::Range& range, - string16* text) const OVERRIDE; + base::string16* text) const OVERRIDE; virtual void OnInputMethodChanged() OVERRIDE; virtual bool ChangeTextDirectionAndLayoutAlignment( base::i18n::TextDirection direction) OVERRIDE; @@ -516,7 +516,7 @@ class RenderWidgetHostViewWin // Tooltips // The text to be shown in the tooltip, supplied by the renderer. - string16 tooltip_text_; + base::string16 tooltip_text_; // The tooltip control hwnd HWND tooltip_hwnd_; // Whether or not a tooltip is currently visible. We use this to track diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index 19d5958..4dfcf70 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -269,7 +269,7 @@ TestRenderViewHost::~TestRenderViewHost() { } bool TestRenderViewHost::CreateRenderView( - const string16& frame_name, + const base::string16& frame_name, int opener_route_id, int32 max_page_id) { DCHECK(!render_view_created_); diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 97bcd6e..680f937 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -117,7 +117,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { int error_code) OVERRIDE; virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) { } virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE {} + virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE {} virtual void SelectionBoundsChanged( const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE {} virtual void ScrollOffsetChanged() OVERRIDE {} @@ -312,7 +312,7 @@ class TestRenderViewHost // RenderViewHost overrides -------------------------------------------------- - virtual bool CreateRenderView(const string16& frame_name, + virtual bool CreateRenderView(const base::string16& frame_name, int opener_route_id, int32 max_page_id) OVERRIDE; virtual bool IsRenderViewLive() const OVERRIDE; diff --git a/content/browser/session_history_browsertest.cc b/content/browser/session_history_browsertest.cc index 7d006b6..bec8293 100644 --- a/content/browser/session_history_browsertest.cc +++ b/content/browser/session_history_browsertest.cc @@ -99,7 +99,7 @@ class SessionHistoryTest : public ContentBrowserTest { void NavigateAndCheckTitle(const char* filename, const std::string& expected_title) { - string16 expected_title16(ASCIIToUTF16(expected_title)); + base::string16 expected_title16(ASCIIToUTF16(expected_title)); TitleWatcher title_watcher(shell()->web_contents(), expected_title16); NavigateToURL(shell(), GetURL(filename)); ASSERT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc index 5524091..05b3ae7 100644 --- a/content/browser/site_instance_impl_unittest.cc +++ b/content/browser/site_instance_impl_unittest.cc @@ -204,7 +204,8 @@ TEST_F(SiteInstanceTest, SiteInstanceDestructor) { EXPECT_EQ(0, site_delete_counter); NavigationEntryImpl* e1 = new NavigationEntryImpl( - instance, 0, url, Referrer(), string16(), PAGE_TRANSITION_LINK, false); + instance, 0, url, Referrer(), base::string16(), PAGE_TRANSITION_LINK, + false); // Redundantly setting e1's SiteInstance shouldn't affect the ref count. e1->set_site_instance(instance); @@ -212,7 +213,8 @@ TEST_F(SiteInstanceTest, SiteInstanceDestructor) { // Add a second reference NavigationEntryImpl* e2 = new NavigationEntryImpl( - instance, 0, url, Referrer(), string16(), PAGE_TRANSITION_LINK, false); + instance, 0, url, Referrer(), base::string16(), PAGE_TRANSITION_LINK, + false); // Now delete both entries and be sure the SiteInstance goes away. delete e1; @@ -264,7 +266,8 @@ TEST_F(SiteInstanceTest, CloneNavigationEntry) { &browsing_delete_counter); NavigationEntryImpl* e1 = new NavigationEntryImpl( - instance1, 0, url, Referrer(), string16(), PAGE_TRANSITION_LINK, false); + instance1, 0, url, Referrer(), base::string16(), PAGE_TRANSITION_LINK, + false); // Clone the entry NavigationEntryImpl* e2 = new NavigationEntryImpl(*e1); diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc index f32e1e9..cca1df0 100644 --- a/content/browser/site_per_process_browsertest.cc +++ b/content/browser/site_per_process_browsertest.cc @@ -36,11 +36,11 @@ class SitePerProcessWebContentsObserver: public WebContentsObserver { virtual void DidFailProvisionalLoad( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) OVERRIDE { navigation_url_ = validated_url; navigation_succeeded_ = false; @@ -48,7 +48,7 @@ class SitePerProcessWebContentsObserver: public WebContentsObserver { virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, diff --git a/content/browser/speech/google_one_shot_remote_engine.cc b/content/browser/speech/google_one_shot_remote_engine.cc index a421e79..575dd5f 100644 --- a/content/browser/speech/google_one_shot_remote_engine.cc +++ b/content/browser/speech/google_one_shot_remote_engine.cc @@ -121,7 +121,7 @@ bool ParseServerResponse(const std::string& response_body, const base::DictionaryValue* hypothesis_value = static_cast<const base::DictionaryValue*>(hypothesis); - string16 utterance; + base::string16 utterance; if (!hypothesis_value->GetString(kUtteranceString, &utterance)) { LOG(WARNING) << "ParseServerResponse: Missing utterance value."; diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc index bdc9d1c..6ecfa70 100644 --- a/content/browser/speech/speech_recognition_manager_impl.cc +++ b/content/browser/speech/speech_recognition_manager_impl.cc @@ -672,7 +672,7 @@ bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { return audio_manager_->HasAudioInputDevices(); } -string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { +base::string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { return audio_manager_->GetAudioInputDeviceModel(); } diff --git a/content/browser/speech/speech_recognition_manager_impl.h b/content/browser/speech/speech_recognition_manager_impl.h index 7db7d24..d471cf3 100644 --- a/content/browser/speech/speech_recognition_manager_impl.h +++ b/content/browser/speech/speech_recognition_manager_impl.h @@ -75,7 +75,7 @@ class CONTENT_EXPORT SpeechRecognitionManagerImpl : int render_view_id, int request_id) const OVERRIDE; virtual bool HasAudioInputDevices() OVERRIDE; - virtual string16 GetAudioInputDeviceModel() OVERRIDE; + virtual base::string16 GetAudioInputDeviceModel() OVERRIDE; virtual void ShowAudioInputSettings() OVERRIDE; // SpeechRecognitionEventListener methods. diff --git a/content/browser/speech/speech_recognizer_impl_android.cc b/content/browser/speech/speech_recognizer_impl_android.cc index c771cef..2e8c57e 100644 --- a/content/browser/speech/speech_recognizer_impl_android.cc +++ b/content/browser/speech/speech_recognizer_impl_android.cc @@ -146,7 +146,7 @@ void SpeechRecognizerImplAndroid::OnAudioEnd(JNIEnv* env, jobject obj) { void SpeechRecognizerImplAndroid::OnRecognitionResults(JNIEnv* env, jobject obj, jobjectArray strings, jfloatArray floats, jboolean provisional) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - std::vector<string16> options; + std::vector<base::string16> options; AppendJavaStringArrayToStringVector(env, strings, &options); std::vector<float> scores(options.size(), 0.0); if (floats != NULL) diff --git a/content/browser/web_contents/touch_editable_impl_aura.cc b/content/browser/web_contents/touch_editable_impl_aura.cc index 6f85625..ed002c7 100644 --- a/content/browser/web_contents/touch_editable_impl_aura.cc +++ b/content/browser/web_contents/touch_editable_impl_aura.cc @@ -307,7 +307,7 @@ bool TouchEditableImplAura::IsCommandIdEnabled(int command_id) const { case IDS_APP_COPY: return has_selection; case IDS_APP_PASTE: { - string16 result; + base::string16 result; ui::Clipboard::GetForCurrentThread()->ReadText( ui::CLIPBOARD_TYPE_COPY_PASTE, &result); return editable && !result.empty(); diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc index 3a59057..ffc8713 100644 --- a/content/browser/web_contents/web_contents_drag_win.cc +++ b/content/browser/web_contents/web_contents_drag_win.cc @@ -227,7 +227,7 @@ void WebContentsDragWin::PrepareDragForDownload( const GURL& page_url, const std::string& page_encoding) { // Parse the download metadata. - string16 mime_type; + base::string16 mime_type; base::FilePath file_name; GURL download_url; if (!ParseDownloadMetadata(drop_data.download_metadata, @@ -284,7 +284,7 @@ void WebContentsDragWin::PrepareDragForFileContents( // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. if (file_name.BaseName().RemoveExtension().empty()) { - const string16 extension = file_name.Extension(); + const base::string16 extension = file_name.Extension(); // Retrieve the name from the URL. file_name = base::FilePath( net::GetSuggestedFilename(drop_data.url, "", "", "", "", "")); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index e05cab0..7d04a60 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -348,7 +348,7 @@ WebContentsImpl::WebContentsImpl( crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), crashed_error_code_(0), waiting_for_response_(false), - load_state_(net::LOAD_STATE_IDLE, string16()), + load_state_(net::LOAD_STATE_IDLE, base::string16()), upload_size_(0), upload_position_(0), displayed_insecure_content_(false), @@ -727,7 +727,7 @@ gfx::NativeViewAccessible accessible_parent) { } #endif -const string16& WebContentsImpl::GetTitle() const { +const base::string16& WebContentsImpl::GetTitle() const { // Transient entries take precedence. They are used for interstitial pages // that are shown on top of existing pages. NavigationEntry* entry = controller_.GetTransientEntry(); @@ -744,7 +744,7 @@ const string16& WebContentsImpl::GetTitle() const { entry = controller_.GetVisibleEntry(); if (!(entry && entry->IsViewSourceMode())) { // Give the Web UI the chance to override our title. - const string16& title = our_web_ui->GetOverriddenTitle(); + const base::string16& title = our_web_ui->GetOverriddenTitle(); if (!title.empty()) return title; } @@ -832,7 +832,7 @@ const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { return load_state_; } -const string16& WebContentsImpl::GetLoadStateHost() const { +const base::string16& WebContentsImpl::GetLoadStateHost() const { return load_state_host_; } @@ -2219,7 +2219,7 @@ void WebContentsImpl::OnDidFailLoadWithError( const GURL& url, bool is_main_frame, int error_code, - const string16& error_description) { + const base::string16& error_description) { GURL validated_url(url); RenderProcessHost* render_process_host = message_source_->GetProcess(); RenderViewHost::FilterURL(render_process_host, false, &validated_url); @@ -2280,7 +2280,7 @@ void WebContentsImpl::OnJSOutOfMemory() { void WebContentsImpl::OnRegisterProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture) { if (!delegate_) return; @@ -2516,7 +2516,8 @@ void WebContentsImpl::SetIsLoading(RenderViewHost* render_view_host, return; if (!is_loading) { - load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); + load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, + base::string16()); load_state_host_.clear(); upload_size_ = 0; upload_position_ = 0; @@ -2618,11 +2619,11 @@ void WebContentsImpl::UpdateMaxPageIDIfNecessary(RenderViewHost* rvh) { } bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry, - const string16& title) { + const base::string16& title) { // For file URLs without a title, use the pathname instead. In the case of a // synthesized title, we don't want the update to count toward the "one set // per page of the title to history." - string16 final_title; + base::string16 final_title; bool explicit_set; if (entry && entry->GetURL().SchemeIsFile() && title.empty()) { final_title = UTF8ToUTF16(entry->GetURL().ExtractFileName()); @@ -2975,7 +2976,7 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh, void WebContentsImpl::UpdateTitle(RenderViewHost* rvh, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) { // If we have a title, that's a pretty good indication that we've started // getting useful data. @@ -3291,8 +3292,8 @@ void WebContentsImpl::RouteMessageEvent( void WebContentsImpl::RunJavaScriptMessage( RenderViewHost* rvh, - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType javascript_message_type, IPC::Message* reply_msg, @@ -3330,7 +3331,7 @@ void WebContentsImpl::RunJavaScriptMessage( if (suppress_this_message) { // If we are suppressing messages, just reply as if the user immediately // pressed "Cancel". - OnDialogClosed(rvh, reply_msg, false, string16()); + OnDialogClosed(rvh, reply_msg, false, base::string16()); } // OnDialogClosed (two lines up) may have caused deletion of this object (see @@ -3338,7 +3339,7 @@ void WebContentsImpl::RunJavaScriptMessage( } void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) { RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(rvh); @@ -3352,7 +3353,7 @@ void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, !delegate_->GetJavaScriptDialogManager(); if (suppress_this_message) { // The reply must be sent to the RVH that sent the request. - rvhi->JavaScriptDialogClosed(reply_msg, true, string16()); + rvhi->JavaScriptDialogClosed(reply_msg, true, base::string16()); return; } @@ -3365,9 +3366,9 @@ void WebContentsImpl::RunBeforeUnloadConfirm(RenderViewHost* rvh, } bool WebContentsImpl::AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { if (!delegate_) return false; return delegate_->AddMessageToConsole(this, level, message, line_no, @@ -3590,7 +3591,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager( GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); if (!static_cast<RenderViewHostImpl*>( - render_view_host)->CreateRenderView(string16(), + render_view_host)->CreateRenderView(base::string16(), opener_route_id, max_page_id)) { return false; @@ -3618,7 +3619,7 @@ bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() { void WebContentsImpl::OnDialogClosed(RenderViewHost* rvh, IPC::Message* reply_msg, bool success, - const string16& user_input) { + const base::string16& user_input) { if (is_showing_before_unload_dialog_ && !success) { // If a beforeunload dialog is canceled, we need to stop the throbber from // spinning, since we forced it to start spinning in Navigate. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 7229682..d2c0483 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -193,7 +193,7 @@ class CONTENT_EXPORT WebContentsImpl virtual void SetParentNativeViewAccessible( gfx::NativeViewAccessible accessible_parent) OVERRIDE; #endif - virtual const string16& GetTitle() const OVERRIDE; + virtual const base::string16& GetTitle() const OVERRIDE; virtual int32 GetMaxPageID() OVERRIDE; virtual int32 GetMaxPageIDForSiteInstance( SiteInstance* site_instance) OVERRIDE; @@ -202,7 +202,7 @@ class CONTENT_EXPORT WebContentsImpl virtual bool IsLoading() const OVERRIDE; virtual bool IsWaitingForResponse() const OVERRIDE; virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; - virtual const string16& GetLoadStateHost() const OVERRIDE; + virtual const base::string16& GetLoadStateHost() const OVERRIDE; virtual uint64 GetUploadSize() const OVERRIDE; virtual uint64 GetUploadPosition() const OVERRIDE; virtual std::set<GURL> GetSitesInTab() const OVERRIDE; @@ -318,7 +318,7 @@ class CONTENT_EXPORT WebContentsImpl const PageState& page_state) OVERRIDE; virtual void UpdateTitle(RenderViewHost* render_view_host, int32 page_id, - const string16& title, + const base::string16& title, base::i18n::TextDirection title_direction) OVERRIDE; virtual void UpdateEncoding(RenderViewHost* render_view_host, const std::string& encoding) OVERRIDE; @@ -359,20 +359,20 @@ class CONTENT_EXPORT WebContentsImpl RenderViewHost* rvh, const ViewMsg_PostMessage_Params& params) OVERRIDE; virtual void RunJavaScriptMessage(RenderViewHost* rvh, - const string16& message, - const string16& default_prompt, + const base::string16& message, + const base::string16& default_prompt, const GURL& frame_url, JavaScriptMessageType type, IPC::Message* reply_msg, bool* did_suppress_message) OVERRIDE; virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, - const string16& message, + const base::string16& message, bool is_reload, IPC::Message* reply_msg) OVERRIDE; virtual bool AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; virtual RendererPreferences GetRendererPrefs( BrowserContext* browser_context) const OVERRIDE; virtual WebPreferences GetWebkitPrefs() OVERRIDE; @@ -594,7 +594,7 @@ class CONTENT_EXPORT WebContentsImpl void OnDialogClosed(RenderViewHost* rvh, IPC::Message* reply_msg, bool success, - const string16& user_input); + const base::string16& user_input); // Callback function when requesting permission to access the PPAPI broker. // |result| is true if permission was granted. @@ -617,7 +617,7 @@ class CONTENT_EXPORT WebContentsImpl const GURL& url, bool is_main_frame, int error_code, - const string16& error_description); + const base::string16& error_description); void OnGoToEntryAtOffset(int offset); void OnUpdateZoomLimits(int minimum_percent, int maximum_percent, @@ -627,7 +627,7 @@ class CONTENT_EXPORT WebContentsImpl void OnRegisterProtocolHandler(const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture); void OnFindReply(int request_id, int number_of_matches, @@ -714,7 +714,7 @@ class CONTENT_EXPORT WebContentsImpl // or the dedicated set title message. It returns true if the new title is // different and was therefore updated. bool UpdateTitleForEntry(NavigationEntryImpl* entry, - const string16& title); + const base::string16& title); // Causes the WebContentsImpl to navigate in the right renderer to |entry|, // which must be already part of the entries in the navigation controller. @@ -876,7 +876,7 @@ class CONTENT_EXPORT WebContentsImpl // The current load state and the URL associated with it. net::LoadStateWithParam load_state_; - string16 load_state_host_; + base::string16 load_state_host_; // Upload progress, for displaying in the status bar. // Set to zero when there is no significant upload happening. uint64 upload_size_; @@ -885,7 +885,7 @@ class CONTENT_EXPORT WebContentsImpl // Data for current page ----------------------------------------------------- // When a title cannot be taken from any entry, this title will be used. - string16 page_title_when_no_navigation_entry_; + base::string16 page_title_when_no_navigation_entry_; // When a navigation occurs, we record its contents MIME type. It can be // used to check whether we can do something for some special contents. diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc index d5ac705..01c0191 100644 --- a/content/browser/web_contents/web_contents_impl_unittest.cc +++ b/content/browser/web_contents/web_contents_impl_unittest.cc @@ -284,7 +284,7 @@ class TestWebContentsObserver : public WebContentsObserver { const GURL& validated_url, bool is_main_frame, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) OVERRIDE { last_url_ = validated_url; } @@ -318,12 +318,12 @@ TEST_F(WebContentsImplTest, DontUseTitleFromPendingEntry) { const GURL kGURL("chrome://blah"); controller().LoadURL( kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string()); - EXPECT_EQ(string16(), contents()->GetTitle()); + EXPECT_EQ(base::string16(), contents()->GetTitle()); } TEST_F(WebContentsImplTest, UseTitleFromPendingEntryIfSet) { const GURL kGURL("chrome://blah"); - const string16 title = ASCIIToUTF16("My Title"); + const base::string16 title = ASCIIToUTF16("My Title"); controller().LoadURL( kGURL, Referrer(), PAGE_TRANSITION_TYPED, std::string()); @@ -2152,7 +2152,7 @@ TEST_F(WebContentsImplTest, FilterURLs) { // Check that an IPC with about:whatever is correctly normalized. other_contents->TestDidFailLoadWithError( - 1, url_from_ipc, true, 1, string16()); + 1, url_from_ipc, true, 1, base::string16()); EXPECT_EQ(url_normalized, other_observer.last_url()); } diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc index fc27ace..f66b5ec 100644 --- a/content/browser/web_contents/web_contents_view_android.cc +++ b/content/browser/web_contents/web_contents_view_android.cc @@ -80,7 +80,7 @@ void WebContentsViewAndroid::GetContainerBounds(gfx::Rect* out) const { *out = rwhv->GetViewBounds(); } -void WebContentsViewAndroid::SetPageTitle(const string16& title) { +void WebContentsViewAndroid::SetPageTitle(const base::string16& title) { if (content_view_core_) content_view_core_->SetTitle(title); } diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h index bcfc0cf..849ca6d 100644 --- a/content/browser/web_contents/web_contents_view_android.h +++ b/content/browser/web_contents/web_contents_view_android.h @@ -57,7 +57,7 @@ class WebContentsViewAndroid : public WebContentsViewPort, RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 353da78..75ca4e6 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -249,7 +249,7 @@ void PrepareDragForFileContents(const DropData& drop_data, // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. if (file_name.BaseName().RemoveExtension().empty()) { - const string16 extension = file_name.Extension(); + const base::string16 extension = file_name.Extension(); // Retrieve the name from the URL. file_name = base::FilePath(net::GetSuggestedFilename( drop_data.url, "", "", "", "", "")).ReplaceExtension(extension); @@ -296,20 +296,20 @@ void PrepareDragData(const DropData& drop_data, // Utility to fill a DropData object from ui::OSExchangeData. void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { - string16 plain_text; + base::string16 plain_text; data.GetString(&plain_text); if (!plain_text.empty()) drop_data->text = base::NullableString16(plain_text, false); GURL url; - string16 url_title; + base::string16 url_title; data.GetURLAndTitle(&url, &url_title); if (url.is_valid()) { drop_data->url = url; drop_data->url_title = url_title; } - string16 html; + base::string16 html; GURL html_base_url; data.GetHtml(&html, &html_base_url); if (!html.empty()) @@ -1298,7 +1298,7 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewAura::SetPageTitle(const string16& title) { +void WebContentsViewAura::SetPageTitle(const base::string16& title) { window_->set_title(title); } diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index 7d377b0..a0597d3 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h @@ -118,7 +118,7 @@ class CONTENT_EXPORT WebContentsViewAura RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc index 3214c13..687ce57 100644 --- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc +++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc @@ -196,14 +196,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a swipe-right now. That should navigate backwards. - string16 expected_title = ASCIIToUTF16("Title: #1"); + base::string16 expected_title = ASCIIToUTF16("Title: #1"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.x() + 2, bounds.y() + 10), gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -214,14 +214,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a fling-right now. That should navigate backwards. - string16 expected_title = ASCIIToUTF16("Title:"); + base::string16 expected_title = ASCIIToUTF16("Title:"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.x() + 2, bounds.y() + 10), gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -232,14 +232,14 @@ class WebContentsViewAuraTest : public ContentBrowserTest { { // Do a swipe-left now. That should navigate forward. - string16 expected_title = ASCIIToUTF16("Title: #1"); + base::string16 expected_title = ASCIIToUTF16("Title: #1"); content::TitleWatcher title_watcher(web_contents, expected_title); generator.GestureScrollSequence( gfx::Point(bounds.right() - 10, bounds.y() + 10), gfx::Point(bounds.x() + 2, bounds.y() + 10), base::TimeDelta::FromMilliseconds(kScrollDurationMs), kScrollSteps); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); value = content::ExecuteScriptAndGetValue(view_host, "get_current()"); ASSERT_TRUE(value->GetAsInteger(&index)); @@ -438,7 +438,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { { // Now, swipe right to navigate backwards. This should navigate away from // index 3 to index 2, and index 3 should have a screenshot. - string16 expected_title = ASCIIToUTF16("Title: #2"); + base::string16 expected_title = ASCIIToUTF16("Title: #2"); content::TitleWatcher title_watcher(web_contents, expected_title); aura::Window* content = web_contents->GetView()->GetContentNativeView(); gfx::Rect bounds = content->GetBoundsInRootWindow(); @@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(20), 1); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(2, GetCurrentIndex()); screenshot_manager()->WaitUntilScreenshotIsReady(); @@ -469,10 +469,10 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, OverscrollScreenshot) { { // Navigate back in history. - string16 expected_title = ASCIIToUTF16("Title: #3"); + base::string16 expected_title = ASCIIToUTF16("Title: #3"); content::TitleWatcher title_watcher(web_contents, expected_title); web_contents->GetController().GoBack(); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(3, GetCurrentIndex()); screenshot_manager()->WaitUntilScreenshotIsReady(); @@ -641,7 +641,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, // Do a swipe left to start a forward navigation. Then quickly do a swipe // right. - string16 expected_title = ASCIIToUTF16("Title: #2"); + base::string16 expected_title = ASCIIToUTF16("Title: #2"); content::TitleWatcher title_watcher(web_contents, expected_title); NavigationWatcher nav_watcher(web_contents); @@ -657,7 +657,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, gfx::Point(bounds.right() - 10, bounds.y() + 10), base::TimeDelta::FromMilliseconds(2000), 10); - string16 actual_title = title_watcher.WaitAndGetTitle(); + base::string16 actual_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, actual_title); EXPECT_EQ(2, GetCurrentIndex()); diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc index 4e3874f..bf4dcb7f 100644 --- a/content/browser/web_contents/web_contents_view_gtk.cc +++ b/content/browser/web_contents/web_contents_view_gtk.cc @@ -246,7 +246,7 @@ RenderWidgetHostView* WebContentsViewGtk::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewGtk::SetPageTitle(const string16& title) { +void WebContentsViewGtk::SetPageTitle(const base::string16& title) { // Set the window name to include the page title so it's easier to spot // when debugging (e.g. via xwininfo -tree). gfx::NativeView content_view = GetContentNativeView(); diff --git a/content/browser/web_contents/web_contents_view_gtk.h b/content/browser/web_contents/web_contents_view_gtk.h index 41f84ab..7a8d25e 100644 --- a/content/browser/web_contents/web_contents_view_gtk.h +++ b/content/browser/web_contents/web_contents_view_gtk.h @@ -66,7 +66,7 @@ class CONTENT_EXPORT WebContentsViewGtk RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc index ac236da..90296a9 100644 --- a/content/browser/web_contents/web_contents_view_guest.cc +++ b/content/browser/web_contents/web_contents_view_guest.cc @@ -142,7 +142,7 @@ RenderWidgetHostView* WebContentsViewGuest::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewGuest::SetPageTitle(const string16& title) { +void WebContentsViewGuest::SetPageTitle(const base::string16& title) { } void WebContentsViewGuest::RenderViewCreated(RenderViewHost* host) { diff --git a/content/browser/web_contents/web_contents_view_guest.h b/content/browser/web_contents/web_contents_view_guest.h index 1e1d812..976a04e 100644 --- a/content/browser/web_contents/web_contents_view_guest.h +++ b/content/browser/web_contents/web_contents_view_guest.h @@ -65,7 +65,7 @@ class CONTENT_EXPORT WebContentsViewGuest RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h index 3d0b94f..a8ffab4 100644 --- a/content/browser/web_contents/web_contents_view_mac.h +++ b/content/browser/web_contents/web_contents_view_mac.h @@ -88,7 +88,7 @@ class WebContentsViewMac : public WebContentsViewPort, RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index 4283ca9..e80bf99 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm @@ -332,7 +332,7 @@ RenderWidgetHostView* WebContentsViewMac::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewMac::SetPageTitle(const string16& title) { +void WebContentsViewMac::SetPageTitle(const base::string16& title) { // Meaningless on the Mac; widgets don't have a "title" attribute } diff --git a/content/browser/web_contents/web_contents_view_win.cc b/content/browser/web_contents/web_contents_view_win.cc index 92548d2..8360d8c 100644 --- a/content/browser/web_contents/web_contents_view_win.cc +++ b/content/browser/web_contents/web_contents_view_win.cc @@ -228,7 +228,7 @@ RenderWidgetHostView* WebContentsViewWin::CreateViewForPopupWidget( return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); } -void WebContentsViewWin::SetPageTitle(const string16& title) { +void WebContentsViewWin::SetPageTitle(const base::string16& title) { // It's possible to get this after the hwnd has been destroyed. if (GetNativeView()) ::SetWindowText(GetNativeView(), title.c_str()); diff --git a/content/browser/web_contents/web_contents_view_win.h b/content/browser/web_contents/web_contents_view_win.h index 505addd..9b052e2 100644 --- a/content/browser/web_contents/web_contents_view_win.h +++ b/content/browser/web_contents/web_contents_view_win.h @@ -73,7 +73,7 @@ class CONTENT_EXPORT WebContentsViewWin RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/browser/web_contents/web_drag_dest_gtk.cc b/content/browser/web_contents/web_drag_dest_gtk.cc index bb9a4d4..738d6b5 100644 --- a/content/browser/web_contents/web_drag_dest_gtk.cc +++ b/content/browser/web_contents/web_drag_dest_gtk.cc @@ -204,7 +204,8 @@ void WebDragDestGtk::OnDragDataReceived( if (url.SchemeIs(chrome::kFileScheme) && net::FileURLToFilePath(url, &file_path)) { drop_data_->filenames.push_back( - DropData::FileInfo(UTF8ToUTF16(file_path.value()), string16())); + DropData::FileInfo(UTF8ToUTF16(file_path.value()), + base::string16())); // This is a hack. Some file managers also populate text/plain with // a file URL when dragging files, so we clear it to avoid exposing // it to the web content. diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm index b3fefca..8768bed 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -290,7 +290,7 @@ int GetModifierFlags() { if (exists) { data->filenames.push_back( DropData::FileInfo( - base::SysNSStringToUTF16(filename), string16())); + base::SysNSStringToUTF16(filename), base::string16())); } } } diff --git a/content/browser/web_contents/web_drag_dest_mac_unittest.mm b/content/browser/web_contents/web_drag_dest_mac_unittest.mm index 48719de..b79c118 100644 --- a/content/browser/web_contents/web_drag_dest_mac_unittest.mm +++ b/content/browser/web_contents/web_drag_dest_mac_unittest.mm @@ -85,7 +85,7 @@ TEST_F(WebDragDestTest, URL) { NSString* url = nil; NSString* title = nil; GURL result_url; - string16 result_title; + base::string16 result_title; // Put a URL on the pasteboard and check it. pboard = [NSPasteboard pasteboardWithUniqueName]; diff --git a/content/browser/web_contents/web_drag_source_gtk.h b/content/browser/web_contents/web_drag_source_gtk.h index 577f60b..8a7c7b2 100644 --- a/content/browser/web_contents/web_drag_source_gtk.h +++ b/content/browser/web_contents/web_drag_source_gtk.h @@ -92,7 +92,7 @@ class CONTENT_EXPORT WebDragSourceGtk : GdkDragContext* drag_context_; // The file mime type for a drag-out download. - string16 wide_download_mime_type_; + base::string16 wide_download_mime_type_; // The file name to be saved to for a drag-out download. base::FilePath download_file_name_; diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm index 805e73b..c667320 100644 --- a/content/browser/web_contents/web_drag_source_mac.mm +++ b/content/browser/web_contents/web_drag_source_mac.mm @@ -49,10 +49,10 @@ namespace { // |NSURLPboardType|. NSString* const kNSURLTitlePboardType = @"public.url-name"; -// Converts a string16 into a FilePath. Use this method instead of +// Converts a base::string16 into a FilePath. Use this method instead of // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. // See http://crbug.com/78782 for more info. -base::FilePath FilePathFromFilename(const string16& filename) { +base::FilePath FilePathFromFilename(const base::string16& filename) { NSString* str = SysUTF16ToNSString(filename); char buf[MAXPATHLEN]; if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)]) @@ -71,7 +71,7 @@ base::FilePath GetFileNameFromDragData(const DropData& drop_data) { // synthesize one from the provided extension and URL. if (file_name.empty()) { // Retrieve the name from the URL. - string16 suggested_filename = + base::string16 suggested_filename = net::GetSuggestedFilename(drop_data.url, "", "", "", "", ""); const std::string extension = file_name.Extension(); file_name = FilePathFromFilename(suggested_filename); @@ -147,7 +147,7 @@ void PromiseWriterHelper(const DropData& drop_data, - (void)lazyWriteToPasteboard:(NSPasteboard*)pboard forType:(NSString*)type { // NSHTMLPboardType requires the character set to be declared. Otherwise, it // assumes US-ASCII. Awesome. - const string16 kHtmlHeader = ASCIIToUTF16( + const base::string16 kHtmlHeader = ASCIIToUTF16( "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"); // Be extra paranoid; avoid crashing. @@ -386,7 +386,7 @@ void PromiseWriterHelper(const DropData& drop_data, downloadFileName_ = GetFileNameFromDragData(*dropData_); net::GetMimeTypeFromExtension(downloadFileName_.Extension(), &mimeType); } else { - string16 mimeType16; + base::string16 mimeType16; base::FilePath fileName; if (content::ParseDownloadMetadata( dropData_->download_metadata, diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc index 6a5b6025..6775eb7 100644 --- a/content/browser/webui/web_ui_data_source_impl.cc +++ b/content/browser/webui/web_ui_data_source_impl.cc @@ -95,7 +95,7 @@ WebUIDataSourceImpl::~WebUIDataSourceImpl() { } void WebUIDataSourceImpl::AddString(const std::string& name, - const string16& value) { + const base::string16& value) { localized_strings_.SetString(name, value); } diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h index 1f81004..91ec087 100644 --- a/content/browser/webui/web_ui_data_source_impl.h +++ b/content/browser/webui/web_ui_data_source_impl.h @@ -28,7 +28,7 @@ class CONTENT_EXPORT WebUIDataSourceImpl public: // WebUIDataSource implementation: virtual void AddString(const std::string& name, - const string16& value) OVERRIDE; + const base::string16& value) OVERRIDE; virtual void AddString(const std::string& name, const std::string& value) OVERRIDE; virtual void AddLocalizedString(const std::string& name, int ids) OVERRIDE; diff --git a/content/browser/webui/web_ui_data_source_unittest.cc b/content/browser/webui/web_ui_data_source_unittest.cc index f384a43..a5da7eb 100644 --- a/content/browser/webui/web_ui_data_source_unittest.cc +++ b/content/browser/webui/web_ui_data_source_unittest.cc @@ -25,10 +25,10 @@ class TestClient : public TestContentClient { TestClient() {} virtual ~TestClient() {} - virtual string16 GetLocalizedString(int message_id) const OVERRIDE { + virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE { if (message_id == kDummyStringId) return UTF8ToUTF16(kDummyString); - return string16(); + return base::string16(); } diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc index e54a6d8..4774e4f 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -27,10 +27,10 @@ namespace content { const WebUI::TypeID WebUI::kNoWebUI = NULL; // static -string16 WebUI::GetJavascriptCall( +base::string16 WebUI::GetJavascriptCall( const std::string& function_name, const std::vector<const Value*>& arg_list) { - string16 parameters; + base::string16 parameters; std::string json; for (size_t i = 0; i < arg_list.size(); ++i) { if (i > 0) @@ -106,11 +106,11 @@ ui::ScaleFactor WebUIImpl::GetDeviceScaleFactor() const { return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); } -const string16& WebUIImpl::GetOverriddenTitle() const { +const base::string16& WebUIImpl::GetOverriddenTitle() const { return overridden_title_; } -void WebUIImpl::OverrideTitle(const string16& title) { +void WebUIImpl::OverrideTitle(const base::string16& title) { overridden_title_ = title; } @@ -144,7 +144,7 @@ void WebUIImpl::SetController(WebUIController* controller) { void WebUIImpl::CallJavascriptFunction(const std::string& function_name) { DCHECK(IsStringASCII(function_name)); - string16 javascript = ASCIIToUTF16(function_name + "();"); + base::string16 javascript = ASCIIToUTF16(function_name + "();"); ExecuteJavascript(javascript); } @@ -230,7 +230,7 @@ void WebUIImpl::AddMessageHandler(WebUIMessageHandler* handler) { handlers_.push_back(handler); } -void WebUIImpl::ExecuteJavascript(const string16& javascript) { +void WebUIImpl::ExecuteJavascript(const base::string16& javascript) { static_cast<RenderViewHostImpl*>( web_contents_->GetRenderViewHost())->ExecuteJavascriptInWebFrame( ASCIIToUTF16(frame_xpath_), javascript); diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h index a359117..8715e43 100644 --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h @@ -33,8 +33,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, virtual WebUIController* GetController() const OVERRIDE; virtual void SetController(WebUIController* controller) OVERRIDE; virtual ui::ScaleFactor GetDeviceScaleFactor() const OVERRIDE; - virtual const string16& GetOverriddenTitle() const OVERRIDE; - virtual void OverrideTitle(const string16& title) OVERRIDE; + virtual const base::string16& GetOverriddenTitle() const OVERRIDE; + virtual void OverrideTitle(const base::string16& title) OVERRIDE; virtual PageTransition GetLinkTransitionType() const OVERRIDE; virtual void SetLinkTransitionType(PageTransition type) OVERRIDE; virtual int GetBindings() const OVERRIDE; @@ -78,7 +78,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, const base::ListValue& args); // Execute a string of raw Javascript on the page. - void ExecuteJavascript(const string16& javascript); + void ExecuteJavascript(const base::string16& javascript); // A map of message name -> message handling callback. typedef std::map<std::string, MessageCallback> MessageCallbackMap; @@ -86,7 +86,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, // Options that may be overridden by individual Web UI implementations. The // bool options default to false. See the public getters for more information. - string16 overridden_title_; // Defaults to empty string. + base::string16 overridden_title_; // Defaults to empty string. PageTransition link_transition_type_; // Defaults to LINK. int bindings_; // The bindings from BindingsPolicy that should be enabled for // this page. diff --git a/content/browser/webui/web_ui_message_handler.cc b/content/browser/webui/web_ui_message_handler.cc index db554c0e..57b2c46 100644 --- a/content/browser/webui/web_ui_message_handler.cc +++ b/content/browser/webui/web_ui_message_handler.cc @@ -36,12 +36,12 @@ bool WebUIMessageHandler::ExtractDoubleValue(const ListValue* value, return false; } -string16 WebUIMessageHandler::ExtractStringValue(const ListValue* value) { - string16 string16_value; +base::string16 WebUIMessageHandler::ExtractStringValue(const ListValue* value) { + base::string16 string16_value; if (value->GetString(0, &string16_value)) return string16_value; NOTREACHED(); - return string16(); + return base::string16(); } } // namespace content diff --git a/content/browser/webui/web_ui_message_handler_unittest.cc b/content/browser/webui/web_ui_message_handler_unittest.cc index e38acd7..33cdb61 100644 --- a/content/browser/webui/web_ui_message_handler_unittest.cc +++ b/content/browser/webui/web_ui_message_handler_unittest.cc @@ -14,9 +14,9 @@ namespace content { TEST(WebUIMessageHandlerTest, ExtractIntegerValue) { ListValue list; int value, zero_value = 0, neg_value = -1234, pos_value = 1234; - string16 zero_string(UTF8ToUTF16("0")); - string16 neg_string(UTF8ToUTF16("-1234")); - string16 pos_string(UTF8ToUTF16("1234")); + base::string16 zero_string(UTF8ToUTF16("0")); + base::string16 neg_string(UTF8ToUTF16("-1234")); + base::string16 pos_string(UTF8ToUTF16("1234")); list.Append(new base::FundamentalValue(zero_value)); EXPECT_TRUE(WebUIMessageHandler::ExtractIntegerValue(&list, &value)); @@ -51,9 +51,9 @@ TEST(WebUIMessageHandlerTest, ExtractIntegerValue) { TEST(WebUIMessageHandlerTest, ExtractDoubleValue) { base::ListValue list; double value, zero_value = 0.0, neg_value = -1234.5, pos_value = 1234.5; - string16 zero_string(UTF8ToUTF16("0")); - string16 neg_string(UTF8ToUTF16("-1234.5")); - string16 pos_string(UTF8ToUTF16("1234.5")); + base::string16 zero_string(UTF8ToUTF16("0")); + base::string16 neg_string(UTF8ToUTF16("-1234.5")); + base::string16 pos_string(UTF8ToUTF16("1234.5")); list.Append(new base::FundamentalValue(zero_value)); EXPECT_TRUE(WebUIMessageHandler::ExtractDoubleValue(&list, &value)); @@ -87,10 +87,10 @@ TEST(WebUIMessageHandlerTest, ExtractDoubleValue) { TEST(WebUIMessageHandlerTest, ExtractStringValue) { base::ListValue list; - string16 in_string(UTF8ToUTF16( + base::string16 in_string(UTF8ToUTF16( "The facts, though interesting, are irrelevant.")); list.Append(new base::StringValue(in_string)); - string16 out_string = WebUIMessageHandler::ExtractStringValue(&list); + base::string16 out_string = WebUIMessageHandler::ExtractStringValue(&list); EXPECT_EQ(in_string, out_string); } diff --git a/content/browser/worker_host/test/worker_browsertest.cc b/content/browser/worker_host/test/worker_browsertest.cc index a71a28e..acd00fb 100644 --- a/content/browser/worker_host/test/worker_browsertest.cc +++ b/content/browser/worker_host/test/worker_browsertest.cc @@ -42,10 +42,10 @@ class WorkerTest : public ContentBrowserTest { const std::string& test_case, const std::string& query) { GURL url = GetTestURL(test_case, query); - const string16 expected_title = ASCIIToUTF16("OK"); + const base::string16 expected_title = ASCIIToUTF16("OK"); TitleWatcher title_watcher(window->web_contents(), expected_title); NavigateToURL(window, url); - string16 final_title = title_watcher.WaitAndGetTitle(); + base::string16 final_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, final_title); } @@ -275,10 +275,10 @@ IN_PROC_BROWSER_TEST_F(WorkerTest, WebSocketSharedWorker) { // Run test. Shell* window = shell(); - const string16 expected_title = ASCIIToUTF16("OK"); + const base::string16 expected_title = ASCIIToUTF16("OK"); TitleWatcher title_watcher(window->web_contents(), expected_title); NavigateToURL(window, url); - string16 final_title = title_watcher.WaitAndGetTitle(); + base::string16 final_title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, final_title); } diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index 08277da..fae589b 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -372,8 +372,8 @@ void WorkerProcessHost::OnWorkerContextClosed(int worker_route_id) { void WorkerProcessHost::OnAllowDatabase(int worker_route_id, const GURL& url, - const string16& name, - const string16& display_name, + const base::string16& name, + const base::string16& display_name, unsigned long estimated_size, bool* result) { *result = GetContentClient()->browser()->AllowWorkerDatabase( @@ -390,7 +390,7 @@ void WorkerProcessHost::OnAllowFileSystem(int worker_route_id, void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id, const GURL& url, - const string16& name, + const base::string16& name, bool* result) { *result = GetContentClient()->browser()->AllowWorkerIndexedDB( url, name, resource_context_, GetRenderViewIDsForWorker(worker_route_id)); @@ -572,7 +572,7 @@ net::URLRequestContext* WorkerProcessHost::GetRequestContext( WorkerProcessHost::WorkerInstance::WorkerInstance( const GURL& url, - const string16& name, + const base::string16& name, int worker_route_id, int parent_process_id, int64 main_resource_appcache_id, @@ -593,7 +593,7 @@ WorkerProcessHost::WorkerInstance::WorkerInstance( WorkerProcessHost::WorkerInstance::WorkerInstance( const GURL& url, bool shared, - const string16& name, + const base::string16& name, ResourceContext* resource_context, const WorkerStoragePartition& partition) : url_(url), @@ -618,7 +618,7 @@ WorkerProcessHost::WorkerInstance::~WorkerInstance() { // b) the names are both empty, and the urls are equal bool WorkerProcessHost::WorkerInstance::Matches( const GURL& match_url, - const string16& match_name, + const base::string16& match_name, const WorkerStoragePartition& partition, ResourceContext* resource_context) const { // Only match open shared workers. diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h index 0a9ea60..c3fa64d 100644 --- a/content/browser/worker_host/worker_process_host.h +++ b/content/browser/worker_host/worker_process_host.h @@ -57,7 +57,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, class WorkerInstance { public: WorkerInstance(const GURL& url, - const string16& name, + const base::string16& name, int worker_route_id, int parent_process_id, int64 main_resource_appcache_id, @@ -66,7 +66,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, // Used for pending instances. Rest of the parameters are ignored. WorkerInstance(const GURL& url, bool shared, - const string16& name, + const base::string16& name, ResourceContext* resource_context, const WorkerStoragePartition& partition); ~WorkerInstance(); @@ -92,7 +92,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, // applies to shared workers. bool Matches( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& partition, ResourceContext* resource_context) const; @@ -107,7 +107,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, bool closed() const { return closed_; } void set_closed(bool closed) { closed_ = closed; } const GURL& url() const { return url_; } - const string16 name() const { return name_; } + const base::string16 name() const { return name_; } int worker_route_id() const { return worker_route_id_; } int parent_process_id() const { return parent_process_id_; } int64 main_resource_appcache_id() const { @@ -127,7 +127,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, // Set of all filters (clients) associated with this worker. GURL url_; bool closed_; - string16 name_; + base::string16 name_; int worker_route_id_; int parent_process_id_; int64 main_resource_appcache_id_; @@ -196,8 +196,8 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, void OnWorkerContextClosed(int worker_route_id); void OnAllowDatabase(int worker_route_id, const GURL& url, - const string16& name, - const string16& display_name, + const base::string16& name, + const base::string16& display_name, unsigned long estimated_size, bool* result); void OnAllowFileSystem(int worker_route_id, @@ -205,7 +205,7 @@ class WorkerProcessHost : public BrowserChildProcessHostDelegate, bool* result); void OnAllowIndexedDB(int worker_route_id, const GURL& url, - const string16& name, + const base::string16& name, bool* result); void OnForceKillWorkerProcess(); diff --git a/content/browser/worker_host/worker_service_impl.cc b/content/browser/worker_host/worker_service_impl.cc index d2ab272..3ebab46 100644 --- a/content/browser/worker_host/worker_service_impl.cc +++ b/content/browser/worker_host/worker_service_impl.cc @@ -650,7 +650,7 @@ void WorkerServiceImpl::NotifyWorkerProcessCreated() { WorkerProcessHost::WorkerInstance* WorkerServiceImpl::FindSharedWorkerInstance( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& partition, ResourceContext* resource_context) { for (WorkerProcessHostIterator iter; !iter.Done(); ++iter) { @@ -667,7 +667,7 @@ WorkerProcessHost::WorkerInstance* WorkerServiceImpl::FindSharedWorkerInstance( WorkerProcessHost::WorkerInstance* WorkerServiceImpl::FindPendingInstance( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& partition, ResourceContext* resource_context) { // Walk the pending instances looking for a matching pending worker. @@ -684,7 +684,7 @@ WorkerProcessHost::WorkerInstance* WorkerServiceImpl::FindPendingInstance( void WorkerServiceImpl::RemovePendingInstances( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& partition, ResourceContext* resource_context) { // Walk the pending instances looking for a matching pending worker. @@ -701,7 +701,7 @@ void WorkerServiceImpl::RemovePendingInstances( WorkerProcessHost::WorkerInstance* WorkerServiceImpl::CreatePendingInstance( const GURL& url, - const string16& name, + const base::string16& name, ResourceContext* resource_context, const WorkerStoragePartition& partition) { // Look for an existing pending shared worker. diff --git a/content/browser/worker_host/worker_service_impl.h b/content/browser/worker_host/worker_service_impl.h index 9da0d19..4d5127a 100644 --- a/content/browser/worker_host/worker_service_impl.h +++ b/content/browser/worker_host/worker_service_impl.h @@ -108,23 +108,23 @@ class CONTENT_EXPORT WorkerServiceImpl // APIs for manipulating our set of pending shared worker instances. WorkerProcessHost::WorkerInstance* CreatePendingInstance( const GURL& url, - const string16& name, + const base::string16& name, ResourceContext* resource_context, const WorkerStoragePartition& worker_partition); WorkerProcessHost::WorkerInstance* FindPendingInstance( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& worker_partition, ResourceContext* resource_context); void RemovePendingInstances( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& worker_partition, ResourceContext* resource_context); WorkerProcessHost::WorkerInstance* FindSharedWorkerInstance( const GURL& url, - const string16& name, + const base::string16& name, const WorkerStoragePartition& worker_partition, ResourceContext* resource_context); diff --git a/content/child/browser_font_resource_trusted.cc b/content/child/browser_font_resource_trusted.cc index 35ad824..be4a8b6 100644 --- a/content/child/browser_font_resource_trusted.cc +++ b/content/child/browser_font_resource_trusted.cc @@ -43,14 +43,14 @@ namespace { // undefined reference linker error. const char kCommonScript[] = "Zyyy"; -string16 GetFontFromMap( +base::string16 GetFontFromMap( const webkit_glue::ScriptFontFamilyMap& map, const std::string& script) { webkit_glue::ScriptFontFamilyMap::const_iterator it = map.find(script); if (it != map.end()) return it->second; - return string16(); + return base::string16(); } // Splits a PP_BrowserFont_Trusted_TextRun into a sequence or LTR and RTL @@ -85,7 +85,7 @@ class TextRunCollection { ubidi_close(bidi_); } - const string16& text() const { return text_; } + const base::string16& text() const { return text_; } int num_runs() const { return num_runs_; } // Returns a WebTextRun with the info for the run at the given index. @@ -94,7 +94,7 @@ class TextRunCollection { DCHECK(index < num_runs_); if (bidi_) { bool run_rtl = !!ubidi_getVisualRun(bidi_, index, run_start, run_len); - return WebTextRun(string16(&text_[*run_start], *run_len), + return WebTextRun(base::string16(&text_[*run_start], *run_len), run_rtl, true); } @@ -110,7 +110,7 @@ class TextRunCollection { UBiDi* bidi_; // Text of all the runs. - string16 text_; + base::string16 text_; int num_runs_; @@ -167,7 +167,7 @@ WebFontDescription PPFontDescToWebFontDesc( StringVar* face_name = StringVar::FromPPVar(font.face); // Possibly null. WebFontDescription result; - string16 resolved_family; + base::string16 resolved_family; if (!face_name || face_name->value().empty()) { // Resolve the generic family. switch (font.family) { diff --git a/content/child/db_message_filter.cc b/content/child/db_message_filter.cc index 93fe885..f50d080 100644 --- a/content/child/db_message_filter.cc +++ b/content/child/db_message_filter.cc @@ -31,7 +31,7 @@ bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) { } void DBMessageFilter::OnDatabaseUpdateSize(const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int64 database_size) { blink::WebDatabase::updateDatabaseSize( WebString::fromUTF8(origin_identifier), database_name, database_size); @@ -52,7 +52,7 @@ void DBMessageFilter::OnDatabaseResetSpaceAvailable( void DBMessageFilter::OnDatabaseCloseImmediately( const std::string& origin_identifier, - const string16& database_name) { + const base::string16& database_name) { blink::WebDatabase::closeDatabaseImmediately( WebString::fromUTF8(origin_identifier), database_name); } diff --git a/content/child/db_message_filter.h b/content/child/db_message_filter.h index e918df6..4950006 100644 --- a/content/child/db_message_filter.h +++ b/content/child/db_message_filter.h @@ -23,13 +23,13 @@ class DBMessageFilter : public IPC::ChannelProxy::MessageFilter { private: void OnDatabaseUpdateSize(const std::string& origin_identifier, - const string16& database_name, + const base::string16& database_name, int64 database_size); void OnDatabaseUpdateSpaceAvailable(const std::string& origin_identifier, int64 space_available); void OnDatabaseResetSpaceAvailable(const std::string& origin_identifier); void OnDatabaseCloseImmediately(const std::string& origin_identifier, - const string16& database_name); + const base::string16& database_name); }; } // namespace content diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc index 2b97b4a..9fa1d66 100644 --- a/content/child/indexed_db/indexed_db_dispatcher.cc +++ b/content/child/indexed_db/indexed_db_dispatcher.cc @@ -213,7 +213,7 @@ void IndexedDBDispatcher::RequestIDBCursorPrefetchReset(int used_prefetches, } void IndexedDBDispatcher::RequestIDBFactoryOpen( - const string16& name, + const base::string16& name, int64 version, int64 transaction_id, WebIDBCallbacks* callbacks_ptr, @@ -250,7 +250,7 @@ void IndexedDBDispatcher::RequestIDBFactoryGetDatabaseNames( } void IndexedDBDispatcher::RequestIDBFactoryDeleteDatabase( - const string16& name, + const base::string16& name, WebIDBCallbacks* callbacks_ptr, const std::string& database_identifier) { ResetCursorPrefetchCaches(); @@ -487,7 +487,7 @@ void IndexedDBDispatcher::OnSuccessIndexedDBKey(int32 ipc_thread_id, void IndexedDBDispatcher::OnSuccessStringList( int32 ipc_thread_id, int32 ipc_callbacks_id, - const std::vector<string16>& value) { + const std::vector<base::string16>& value) { DCHECK_EQ(ipc_thread_id, CurrentWorkerId()); WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_callbacks_id); if (!callbacks) @@ -652,7 +652,7 @@ void IndexedDBDispatcher::OnUpgradeNeeded( void IndexedDBDispatcher::OnError(int32 ipc_thread_id, int32 ipc_callbacks_id, int code, - const string16& message) { + const base::string16& message) { DCHECK_EQ(ipc_thread_id, CurrentWorkerId()); WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_callbacks_id); if (!callbacks) @@ -668,7 +668,7 @@ void IndexedDBDispatcher::OnAbort(int32 ipc_thread_id, int32 ipc_database_callbacks_id, int64 transaction_id, int code, - const string16& message) { + const base::string16& message) { DCHECK_EQ(ipc_thread_id, CurrentWorkerId()); WebIDBDatabaseCallbacks* callbacks = pending_database_callbacks_.Lookup(ipc_database_callbacks_id); diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h index 6d60e29..a9f3653 100644 --- a/content/child/indexed_db/indexed_db_dispatcher.h +++ b/content/child/indexed_db/indexed_db_dispatcher.h @@ -71,14 +71,14 @@ class CONTENT_EXPORT IndexedDBDispatcher const std::string& database_identifier); void RequestIDBFactoryOpen( - const string16& name, + const base::string16& name, int64 version, int64 transaction_id, blink::WebIDBCallbacks* callbacks, blink::WebIDBDatabaseCallbacks* database_callbacks, const std::string& database_identifier); - void RequestIDBFactoryDeleteDatabase(const string16& name, + void RequestIDBFactoryDeleteDatabase(const base::string16& name, blink::WebIDBCallbacks* callbacks, const std::string& database_identifier); @@ -192,7 +192,7 @@ class CONTENT_EXPORT IndexedDBDispatcher const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); void OnSuccessStringList(int32 ipc_thread_id, int32 ipc_callbacks_id, - const std::vector<string16>& value); + const std::vector<base::string16>& value); void OnSuccessValue(int32 ipc_thread_id, int32 ipc_callbacks_id, const std::string& value); @@ -208,7 +208,7 @@ class CONTENT_EXPORT IndexedDBDispatcher void OnError(int32 ipc_thread_id, int32 ipc_callbacks_id, int code, - const string16& message); + const base::string16& message); void OnIntBlocked(int32 ipc_thread_id, int32 ipc_callbacks_id, int64 existing_version); @@ -217,7 +217,7 @@ class CONTENT_EXPORT IndexedDBDispatcher int32 ipc_database_id, int64 transaction_id, int code, - const string16& message); + const base::string16& message); void OnComplete(int32 ipc_thread_id, int32 ipc_database_id, int64 transaction_id); diff --git a/content/child/indexed_db/indexed_db_key_builders.cc b/content/child/indexed_db/indexed_db_key_builders.cc index a17065f..ed84ac4 100644 --- a/content/child/indexed_db/indexed_db_key_builders.cc +++ b/content/child/indexed_db/indexed_db_key_builders.cc @@ -30,9 +30,9 @@ static content::IndexedDBKey::KeyArray CopyKeyArray(const WebIDBKey& other) { return result; } -static std::vector<string16> CopyArray( +static std::vector<base::string16> CopyArray( const WebVector<WebString>& array) { - std::vector<string16> copy(array.size()); + std::vector<base::string16> copy(array.size()); for (size_t i = 0; i < array.size(); ++i) copy[i] = array[i]; return copy; diff --git a/content/child/plugin_messages.h b/content/child/plugin_messages.h index 404439f..92651e9 100644 --- a/content/child/plugin_messages.h +++ b/content/child/plugin_messages.h @@ -111,7 +111,7 @@ IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject, // Gets the form value of the plugin instance synchronously. IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_GetFormValue, - string16 /* value */, + base::string16 /* value */, bool /* success */) IPC_MESSAGE_ROUTED3(PluginMsg_DidFinishLoadWithReason, @@ -197,13 +197,13 @@ IPC_MESSAGE_CONTROL1(PluginHostMsg_DidAbortLoading, #if defined(OS_WIN) IPC_MESSAGE_ROUTED4(PluginMsg_ImeCompositionUpdated, - string16 /* text */, + base::string16 /* text */, std::vector<int> /* clauses */, std::vector<int>, /* target */ int /* cursor_position */) IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, - string16 /* text */) + base::string16 /* text */) #endif #if defined(OS_MACOSX) @@ -222,7 +222,7 @@ IPC_MESSAGE_ROUTED2(PluginMsg_WindowFrameChanged, gfx::Rect /* view_frame */) IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, - string16 /* text */) + base::string16 /* text */) // This message, used only on 10.6 and later, transmits the "fake" // window handle allocated by the browser on behalf of the renderer diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc index f5103fb..28c4928 100644 --- a/content/child/service_worker/service_worker_dispatcher.cc +++ b/content/child/service_worker/service_worker_dispatcher.cc @@ -133,7 +133,7 @@ void ServiceWorkerDispatcher::OnRegistrationError( int32 thread_id, int32 request_id, WebServiceWorkerError::ErrorType error_type, - const string16& message) { + const base::string16& message) { WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks = pending_callbacks_.Lookup(request_id); DCHECK(callbacks); diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h index 51a1e21..ef2796b 100644 --- a/content/child/service_worker/service_worker_dispatcher.h +++ b/content/child/service_worker/service_worker_dispatcher.h @@ -65,7 +65,7 @@ class ServiceWorkerDispatcher : public webkit_glue::WorkerTaskRunner::Observer { void OnRegistrationError(int32 thread_id, int32 request_id, blink::WebServiceWorkerError::ErrorType error_type, - const string16& message); + const base::string16& message); IDMap<blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks, IDMapOwnPointer> pending_callbacks_; diff --git a/content/child/webkitplatformsupport_impl.cc b/content/child/webkitplatformsupport_impl.cc index e474aa9..5b8cc79 100644 --- a/content/child/webkitplatformsupport_impl.cc +++ b/content/child/webkitplatformsupport_impl.cc @@ -17,7 +17,7 @@ WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() { WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() { } -string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) { +base::string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) { return GetContentClient()->GetLocalizedString(message_id); } diff --git a/content/child/webkitplatformsupport_impl.h b/content/child/webkitplatformsupport_impl.h index e32483b..b4d5fc7 100644 --- a/content/child/webkitplatformsupport_impl.h +++ b/content/child/webkitplatformsupport_impl.h @@ -22,7 +22,7 @@ class CONTENT_EXPORT WebKitPlatformSupportImpl WebKitPlatformSupportImpl(); virtual ~WebKitPlatformSupportImpl(); - virtual string16 GetLocalizedString(int message_id) OVERRIDE; + virtual base::string16 GetLocalizedString(int message_id) OVERRIDE; virtual base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) OVERRIDE; diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc index aeb8475..7b0658e 100644 --- a/content/child/webmessageportchannel_impl.cc +++ b/content/child/webmessageportchannel_impl.cc @@ -202,7 +202,7 @@ bool WebMessagePortChannelImpl::OnMessageReceived(const IPC::Message& message) { } void WebMessagePortChannelImpl::OnMessage( - const string16& message, + const base::string16& message, const std::vector<int>& sent_message_port_ids, const std::vector<int>& new_routing_ids) { base::AutoLock auto_lock(lock_); @@ -230,7 +230,7 @@ void WebMessagePortChannelImpl::OnMessagesQueued() { base::AutoLock auto_lock(lock_); queued_messages.reserve(message_queue_.size()); while (!message_queue_.empty()) { - string16 message = message_queue_.front().message; + base::string16 message = message_queue_.front().message; const std::vector<WebMessagePortChannelImpl*>& channel_array = message_queue_.front().ports; std::vector<int> port_ids(channel_array.size()); diff --git a/content/child/webmessageportchannel_impl.h b/content/child/webmessageportchannel_impl.h index 8390972..efc1e04 100644 --- a/content/child/webmessageportchannel_impl.h +++ b/content/child/webmessageportchannel_impl.h @@ -58,7 +58,7 @@ class WebMessagePortChannelImpl // IPC::Listener implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - void OnMessage(const string16& message, + void OnMessage(const base::string16& message, const std::vector<int>& sent_message_port_ids, const std::vector<int>& new_routing_ids); void OnMessagesQueued(); @@ -67,7 +67,7 @@ class WebMessagePortChannelImpl Message(); ~Message(); - string16 message; + base::string16 message; std::vector<WebMessagePortChannelImpl*> ports; }; diff --git a/content/common/android/address_parser.cc b/content/common/android/address_parser.cc index f4587c8..15874fd3 100644 --- a/content/common/android/address_parser.cc +++ b/content/common/android/address_parser.cc @@ -48,7 +48,7 @@ namespace address_parser { using namespace internal; -bool FindAddress(const string16& text, string16* address) { +bool FindAddress(const base::string16& text, base::string16* address) { size_t start, end; if (FindAddress(text.begin(), text.end(), &start, &end)) { address->assign(text.substr(start, end)); @@ -57,8 +57,8 @@ bool FindAddress(const string16& text, string16* address) { return false; } -bool FindAddress(const string16::const_iterator& begin, - const string16::const_iterator& end, +bool FindAddress(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos) { HouseNumberParser house_number_parser; @@ -100,7 +100,7 @@ bool FindAddress(const string16::const_iterator& begin, // Check the number of address lines. if (tokenizer.token_is_delim() && newline_delimiters.find( - *tokenizer.token_begin()) != string16::npos) { + *tokenizer.token_begin()) != base::string16::npos) { ++num_lines; } } while (tokenizer.token_is_delim()); diff --git a/content/common/android/address_parser.h b/content/common/android/address_parser.h index 71a3aba..1a12a32 100644 --- a/content/common/android/address_parser.h +++ b/content/common/android/address_parser.h @@ -17,14 +17,14 @@ namespace address_parser { // Find the first address in some chunk of text. If an address is found in // |text| true is returned and the address is copied into |address|. // Otherwise, false is returned. -bool FindAddress(const string16& text, string16* address); +bool FindAddress(const base::string16& text, base::string16* address); // Find the first address in some chunk of test. |begin| is the starting // position to search from, |end| is the position to search to. |start_pos| // and |end_pos| are set to the starting and ending position of the address, // if found. -CONTENT_EXPORT bool FindAddress(const string16::const_iterator& begin, - const string16::const_iterator& end, +CONTENT_EXPORT bool FindAddress(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos); diff --git a/content/common/android/address_parser_internal.cc b/content/common/android/address_parser_internal.cc index 0970b17..fe14d3b 100644 --- a/content/common/android/address_parser_internal.cc +++ b/content/common/android/address_parser_internal.cc @@ -20,23 +20,23 @@ const size_t kZipPlus4Digits = 9; // Maximum number of digits of a house number, including possible hyphens. const size_t kMaxHouseDigits = 5; -char16 SafePreviousChar(const string16::const_iterator& it, - const string16::const_iterator& begin) { +char16 SafePreviousChar(const base::string16::const_iterator& it, + const base::string16::const_iterator& begin) { if (it == begin) return ' '; return *(it - 1); } -char16 SafeNextChar(const string16::const_iterator& it, - const string16::const_iterator& end) { +char16 SafeNextChar(const base::string16::const_iterator& it, + const base::string16::const_iterator& end) { if (it == end) return ' '; return *(it + 1); } -bool WordLowerCaseEqualsASCII(string16::const_iterator word_begin, - string16::const_iterator word_end, const char* ascii_to_match) { - for (string16::const_iterator it = word_begin; it != word_end; +bool WordLowerCaseEqualsASCII(base::string16::const_iterator word_begin, + base::string16::const_iterator word_end, const char* ascii_to_match) { + for (base::string16::const_iterator it = word_begin; it != word_end; ++it, ++ascii_to_match) { if (!*ascii_to_match || base::ToLowerASCII(*it) != *ascii_to_match) return false; @@ -44,10 +44,10 @@ bool WordLowerCaseEqualsASCII(string16::const_iterator word_begin, return *ascii_to_match == 0 || *ascii_to_match == ' '; } -bool LowerCaseEqualsASCIIWithPlural(string16::const_iterator word_begin, - string16::const_iterator word_end, const char* ascii_to_match, +bool LowerCaseEqualsASCIIWithPlural(base::string16::const_iterator word_begin, + base::string16::const_iterator word_end, const char* ascii_to_match, bool allow_plural) { - for (string16::const_iterator it = word_begin; it != word_end; + for (base::string16::const_iterator it = word_begin; it != word_end; ++it, ++ascii_to_match) { if (!*ascii_to_match && allow_plural && *it == 's' && it + 1 == word_end) return true; @@ -66,8 +66,8 @@ namespace address_parser { namespace internal { -Word::Word(const string16::const_iterator& begin, - const string16::const_iterator& end) +Word::Word(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end) : begin(begin), end(end) { DCHECK(begin <= end); @@ -115,8 +115,8 @@ bool HouseNumberParser::CheckFinished(Word* word) const { } bool HouseNumberParser::Parse( - const string16::const_iterator& begin, - const string16::const_iterator& end, Word* word) { + const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, Word* word) { it_ = begin_ = begin; end_ = end; ResetState(); @@ -417,7 +417,7 @@ bool IsZipValid(const Word& word, size_t state_index) { if (length != kZipDigits && length != kZipPlus4Digits + 1) return false; - for (string16::const_iterator it = word.begin; it != word.end; ++it) { + for (base::string16::const_iterator it = word.begin; it != word.end; ++it) { size_t pos = it - word.begin; if (IsAsciiDigit(*it) || (*it == '-' && pos == kZipDigits)) continue; diff --git a/content/common/android/address_parser_internal.h b/content/common/android/address_parser_internal.h index f236afc..74af6c3 100644 --- a/content/common/android/address_parser_internal.h +++ b/content/common/android/address_parser_internal.h @@ -19,12 +19,12 @@ namespace internal { // Exposed for tests. struct CONTENT_EXPORT Word { - string16::const_iterator begin; - string16::const_iterator end; + base::string16::const_iterator begin; + base::string16::const_iterator end; Word() {} - Word(const string16::const_iterator& begin, - const string16::const_iterator& end); + Word(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end); }; // Exposed for tests. @@ -32,8 +32,8 @@ class CONTENT_EXPORT HouseNumberParser { public: HouseNumberParser() {} - bool Parse(const string16::const_iterator& begin, - const string16::const_iterator& end, + bool Parse(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, Word* word); private: @@ -48,9 +48,9 @@ class CONTENT_EXPORT HouseNumberParser { // Iterators to the beginning, current position and ending of the string // being currently parsed. - string16::const_iterator begin_; - string16::const_iterator it_; - string16::const_iterator end_; + base::string16::const_iterator begin_; + base::string16::const_iterator it_; + base::string16::const_iterator end_; // Number of digits found in the current result candidate. size_t num_digits_; @@ -63,7 +63,7 @@ class CONTENT_EXPORT HouseNumberParser { }; typedef std::vector<Word> WordList; -typedef base::StringTokenizerT<string16, string16::const_iterator> +typedef base::StringTokenizerT<base::string16, base::string16::const_iterator> String16Tokenizer; // These are exposed for tests. diff --git a/content/common/android/address_parser_unittest.cc b/content/common/android/address_parser_unittest.cc index 30497b2..1a8d17e 100644 --- a/content/common/android/address_parser_unittest.cc +++ b/content/common/android/address_parser_unittest.cc @@ -25,13 +25,13 @@ class AddressParserTest : public testing::Test { } std::string GetHouseNumber(const std::string& content) const { - string16 content_16 = UTF8ToUTF16(content); - string16 result; + base::string16 content_16 = UTF8ToUTF16(content); + base::string16 result; HouseNumberParser parser; Word word; if (parser.Parse(content_16.begin(), content_16.end(), &word)) - result = string16(word.begin, word.end); + result = base::string16(word.begin, word.end); return UTF16ToUTF8(result); } @@ -62,7 +62,7 @@ class AddressParserTest : public testing::Test { size_t state_index; EXPECT_TRUE(GetState(state, &state_index)); - string16 zip_16 = UTF8ToUTF16(zip); + base::string16 zip_16 = UTF8ToUTF16(zip); WordList words; TokenizeWords(zip_16, &words); EXPECT_TRUE(words.size() == 1); @@ -70,7 +70,7 @@ class AddressParserTest : public testing::Test { } bool IsLocationName(const std::string& street) const { - string16 street_16 = UTF8ToUTF16(street); + base::string16 street_16 = UTF8ToUTF16(street); WordList words; TokenizeWords(street_16, &words); EXPECT_TRUE(words.size() == 1); @@ -78,8 +78,8 @@ class AddressParserTest : public testing::Test { } std::string FindAddress(const std::string& content) const { - string16 content_16 = UTF8ToUTF16(content); - string16 result_16; + base::string16 content_16 = UTF8ToUTF16(content); + base::string16 result_16; size_t start, end; if (::FindAddress(content_16.begin(), content_16.end(), &start, &end)) result_16 = content_16.substr(start, end - start); diff --git a/content/common/clipboard_messages.h b/content/common/clipboard_messages.h index 60ce680..d212638 100644 --- a/content/common/clipboard_messages.h +++ b/content/common/clipboard_messages.h @@ -56,17 +56,17 @@ IPC_MESSAGE_CONTROL1(ClipboardHostMsg_Clear, ui::ClipboardType /* type */) IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadAvailableTypes, ui::ClipboardType /* type */, - std::vector<string16> /* types */, + std::vector<base::string16> /* types */, bool /* contains filenames */) IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadText, ui::ClipboardType /* type */, - string16 /* result */) + base::string16 /* result */) IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadAsciiText, ui::ClipboardType /* type */, std::string /* result */) IPC_SYNC_MESSAGE_CONTROL1_4(ClipboardHostMsg_ReadHTML, ui::ClipboardType /* type */, - string16 /* markup */, + base::string16 /* markup */, GURL /* url */, uint32 /* fragment start */, uint32 /* fragment end */) @@ -79,13 +79,13 @@ IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadImage, uint32 /* image size */) IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_ReadCustomData, ui::ClipboardType /* type */, - string16 /* type */, - string16 /* result */) + base::string16 /* type */, + base::string16 /* result */) IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadData, ui::Clipboard::FormatType /* format */, std::string /* result */) #if defined(OS_MACOSX) IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync, - string16 /* text */) + base::string16 /* text */) #endif diff --git a/content/common/database_messages.h b/content/common/database_messages.h index 2a20947..849b347 100644 --- a/content/common/database_messages.h +++ b/content/common/database_messages.h @@ -15,7 +15,7 @@ // Notifies the child process of the new database size IPC_MESSAGE_CONTROL3(DatabaseMsg_UpdateSize, std::string /* the origin */, - string16 /* the database name */, + base::string16 /* the database name */, int64 /* the new database size */) // Notifies the child process of the new space available @@ -30,30 +30,30 @@ IPC_MESSAGE_CONTROL1(DatabaseMsg_ResetSpaceAvailable, // Asks the child process to close a database immediately IPC_MESSAGE_CONTROL2(DatabaseMsg_CloseImmediately, std::string /* the origin */, - string16 /* the database name */) + base::string16 /* the database name */) // Database messages sent from the renderer to the browser. // Asks the browser process to open a DB file with the given name. IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_OpenFile, - string16 /* vfs file name */, + base::string16 /* vfs file name */, int /* desired flags */, IPC::PlatformFileForTransit /* file_handle */) // Asks the browser process to delete a DB file IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_DeleteFile, - string16 /* vfs file name */, + base::string16 /* vfs file name */, bool /* whether or not to sync the directory */, int /* SQLite error code */) // Asks the browser process to return the attributes of a DB file IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes, - string16 /* vfs file name */, + base::string16 /* vfs file name */, int32 /* the attributes for the given DB file */) // Asks the browser process to return the size of a DB file IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize, - string16 /* vfs file name */, + base::string16 /* vfs file name */, int64 /* the size of the given DB file */) // Asks the browser process for the amount of space available to an origin @@ -64,22 +64,22 @@ IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetSpaceAvailable, // Notifies the browser process that a new database has been opened IPC_MESSAGE_CONTROL4(DatabaseHostMsg_Opened, std::string /* origin identifier */, - string16 /* database name */, - string16 /* database description */, + base::string16 /* database name */, + base::string16 /* database description */, int64 /* estimated size */) // Notifies the browser process that a database might have been modified IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified, std::string /* origin identifier */, - string16 /* database name */) + base::string16 /* database name */) // Notifies the browser process that a database is about to close IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed, std::string /* origin identifier */, - string16 /* database name */) + base::string16 /* database name */) // Sent when a sqlite error indicates the database is corrupt. IPC_MESSAGE_CONTROL3(DatabaseHostMsg_HandleSqliteError, std::string /* origin identifier */, - string16 /* database name */, + base::string16 /* database name */, int /* error */) diff --git a/content/common/desktop_notification_messages.h b/content/common/desktop_notification_messages.h index 69c7d1f..6f1f0c4 100644 --- a/content/common/desktop_notification_messages.h +++ b/content/common/desktop_notification_messages.h @@ -31,7 +31,7 @@ IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PostDisplay, // trying to display a notification. IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostError, int /* notification_id */, - string16 /* message */) + base::string16 /* message */) // Informs the renderer that the one if its notifications has closed. IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostClose, diff --git a/content/common/dom_storage/dom_storage_messages.h b/content/common/dom_storage/dom_storage_messages.h index 5aa96e3..2cf46e1 100644 --- a/content/common/dom_storage/dom_storage_messages.h +++ b/content/common/dom_storage/dom_storage_messages.h @@ -83,21 +83,21 @@ IPC_SYNC_MESSAGE_CONTROL1_2(DOMStorageHostMsg_LoadStorageArea, // A completion notification is sent in response. IPC_MESSAGE_CONTROL4(DOMStorageHostMsg_SetItem, int /* connection_id */, - string16 /* key */, - string16 /* value */, + base::string16 /* key */, + base::string16 /* value */, GURL /* page_url */) // Logs that a get operation was performed on a key/value pair. IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_LogGetItem, int /* connection_id */, - string16 /* key */, + base::string16 /* key */, base::NullableString16 /* value */) // Remove the value associated with a key in a storage area. // A completion notification is sent in response. IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_RemoveItem, int /* connection_id */, - string16 /* key */, + base::string16 /* key */, GURL /* page_url */) // Clear the storage area. A completion notification is sent in response. diff --git a/content/common/font_cache_dispatcher_win.cc b/content/common/font_cache_dispatcher_win.cc index d6d59de..47c9c12 100644 --- a/content/common/font_cache_dispatcher_win.cc +++ b/content/common/font_cache_dispatcher_win.cc @@ -13,7 +13,7 @@ namespace content { namespace { -typedef std::vector<string16> FontNameVector; +typedef std::vector<base::string16> FontNameVector; typedef std::map<FontCacheDispatcher*, FontNameVector> DispatcherToFontNames; class FontCache { @@ -23,7 +23,7 @@ class FontCache { } void PreCacheFont(const LOGFONT& font, FontCacheDispatcher* dispatcher) { - typedef std::map<string16, FontCache::CacheElement> FontNameToElement; + typedef std::map<base::string16, FontCache::CacheElement> FontNameToElement; base::AutoLock lock(mutex_); @@ -41,7 +41,7 @@ class FontCache { BOOL ret = GetTextMetrics(hdc, &tm); DCHECK(ret); - string16 font_name = font.lfFaceName; + base::string16 font_name = font.lfFaceName; int ref_count_inc = 1; FontNameVector::iterator it = std::find(dispatcher_font_map_[dispatcher].begin(), @@ -68,7 +68,7 @@ class FontCache { } void ReleaseCachedFonts(FontCacheDispatcher* dispatcher) { - typedef std::map<string16, FontCache::CacheElement> FontNameToElement; + typedef std::map<base::string16, FontCache::CacheElement> FontNameToElement; base::AutoLock lock(mutex_); @@ -125,7 +125,7 @@ class FontCache { FontCache() { } - std::map<string16, CacheElement> cache_; + std::map<base::string16, CacheElement> cache_; DispatcherToFontNames dispatcher_font_map_; base::Lock mutex_; diff --git a/content/common/font_list_mac.mm b/content/common/font_list_mac.mm index 4ffb3de..64a54cd 100644 --- a/content/common/font_list_mac.mm +++ b/content/common/font_list_mac.mm @@ -21,9 +21,9 @@ scoped_ptr<base::ListValue> GetFontList_SlowBlocking() { NSString* localized_family_name = [fontManager localizedNameForFamily:family_name face:nil]; base::ListValue* font_item = new base::ListValue(); - string16 family = base::SysNSStringToUTF16(family_name); + base::string16 family = base::SysNSStringToUTF16(family_name); font_item->Append(new base::StringValue(family)); - string16 loc_family = base::SysNSStringToUTF16(localized_family_name); + base::string16 loc_family = base::SysNSStringToUTF16(localized_family_name); font_item->Append(new base::StringValue(loc_family)); font_list->Append(font_item); } diff --git a/content/common/font_list_win.cc b/content/common/font_list_win.cc index 0eb84ed..bc6c1dc 100644 --- a/content/common/font_list_win.cc +++ b/content/common/font_list_win.cc @@ -17,12 +17,12 @@ static int CALLBACK EnumFontFamExProc(ENUMLOGFONTEXW* logical_font, NEWTEXTMETRICEXW* physical_font, DWORD font_type, LPARAM lparam) { - std::set<string16>* font_names = - reinterpret_cast<std::set<string16>*>(lparam); + std::set<base::string16>* font_names = + reinterpret_cast<std::set<base::string16>*>(lparam); if (font_names) { const LOGFONTW& lf = logical_font->elfLogFont; if (lf.lfFaceName[0] && lf.lfFaceName[0] != '@') { - string16 face_name(lf.lfFaceName); + base::string16 face_name(lf.lfFaceName); font_names->insert(face_name); } } @@ -30,7 +30,7 @@ static int CALLBACK EnumFontFamExProc(ENUMLOGFONTEXW* logical_font, } scoped_ptr<base::ListValue> GetFontList_SlowBlocking() { - std::set<string16> font_names; + std::set<base::string16> font_names; LOGFONTW logfont; memset(&logfont, 0, sizeof(logfont)); @@ -42,7 +42,7 @@ scoped_ptr<base::ListValue> GetFontList_SlowBlocking() { ::ReleaseDC(NULL, hdc); scoped_ptr<base::ListValue> font_list(new base::ListValue); - std::set<string16>::iterator iter; + std::set<base::string16>::iterator iter; for (iter = font_names.begin(); iter != font_names.end(); ++iter) { base::ListValue* font_item = new base::ListValue(); font_item->Append(new base::StringValue(*iter)); diff --git a/content/common/handle_enumerator_win.cc b/content/common/handle_enumerator_win.cc index 4482d5b..7cda767 100644 --- a/content/common/handle_enumerator_win.cc +++ b/content/common/handle_enumerator_win.cc @@ -19,7 +19,7 @@ namespace content { namespace { -typedef std::map<const string16, HandleType> HandleTypeMap; +typedef std::map<const base::string16, HandleType> HandleTypeMap; HandleTypeMap& MakeHandleTypeMap() { HandleTypeMap& handle_types = *(new HandleTypeMap()); @@ -52,7 +52,7 @@ void HandleEnumerator::EnumerateHandles() { std::string process_type = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessType); - string16 output = ASCIIToUTF16(process_type); + base::string16 output = ASCIIToUTF16(process_type); output.append(ASCIIToUTF16(" process - Handles at shutdown:\n")); for (sandbox::HandleTable::Iterator sys_handle = handles.HandlesForProcess(::GetCurrentProcessId()); @@ -78,15 +78,15 @@ void HandleEnumerator::EnumerateHandles() { DVLOG(0) << output; } -HandleType StringToHandleType(const string16& type) { +HandleType StringToHandleType(const base::string16& type) { static HandleTypeMap handle_types = MakeHandleTypeMap(); HandleTypeMap::iterator result = handle_types.find(type); return result != handle_types.end() ? result->second : OtherHandle; } -string16 GetAccessString(HandleType handle_type, +base::string16 GetAccessString(HandleType handle_type, ACCESS_MASK access) { - string16 output; + base::string16 output; if (access & GENERIC_READ) output.append(ASCIIToUTF16("\tGENERIC_READ\n")); if (access & GENERIC_WRITE) diff --git a/content/common/handle_enumerator_win.h b/content/common/handle_enumerator_win.h index 5fd4981..3caba84 100644 --- a/content/common/handle_enumerator_win.h +++ b/content/common/handle_enumerator_win.h @@ -31,9 +31,10 @@ enum HandleType { OtherHandle }; -static HandleType StringToHandleType(const string16& type); +static HandleType StringToHandleType(const base::string16& type); -static string16 GetAccessString(HandleType handle_type, ACCESS_MASK access); +static base::string16 GetAccessString(HandleType handle_type, + ACCESS_MASK access); class HandleEnumerator : public base::RefCountedThreadSafe<HandleEnumerator> { public: diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc index 71ddd6a..02610bf 100644 --- a/content/common/indexed_db/indexed_db_key.cc +++ b/content/common/indexed_db/indexed_db_key.cc @@ -76,11 +76,11 @@ IndexedDBKey::IndexedDBKey(const std::string& key) size_estimate_(kOverheadSize + (key.length() * sizeof(std::string::value_type))) {} -IndexedDBKey::IndexedDBKey(const string16& key) +IndexedDBKey::IndexedDBKey(const base::string16& key) : type_(WebIDBKeyTypeString), string_(key), size_estimate_(kOverheadSize + - (key.length() * sizeof(string16::value_type))) {} + (key.length() * sizeof(base::string16::value_type))) {} IndexedDBKey::~IndexedDBKey() {} diff --git a/content/common/indexed_db/indexed_db_key.h b/content/common/indexed_db/indexed_db_key.h index b10eb1f..391b6d6 100644 --- a/content/common/indexed_db/indexed_db_key.h +++ b/content/common/indexed_db/indexed_db_key.h @@ -27,7 +27,7 @@ class CONTENT_EXPORT IndexedDBKey { IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid explicit IndexedDBKey(const KeyArray& array); explicit IndexedDBKey(const std::string& binary); - explicit IndexedDBKey(const string16& str); + explicit IndexedDBKey(const base::string16& str); IndexedDBKey(double number, blink::WebIDBKeyType type); // must be date or number ~IndexedDBKey(); @@ -41,7 +41,7 @@ class CONTENT_EXPORT IndexedDBKey { blink::WebIDBKeyType type() const { return type_; } const std::vector<IndexedDBKey>& array() const { return array_; } const std::string& binary() const { return binary_; } - const string16& string() const { return string_; } + const base::string16& string() const { return string_; } double date() const { return date_; } double number() const { return number_; } @@ -51,7 +51,7 @@ class CONTENT_EXPORT IndexedDBKey { blink::WebIDBKeyType type_; std::vector<IndexedDBKey> array_; std::string binary_; - string16 string_; + base::string16 string_; double date_; double number_; diff --git a/content/common/indexed_db/indexed_db_key_path.cc b/content/common/indexed_db/indexed_db_key_path.cc index b01de73..3783d42 100644 --- a/content/common/indexed_db/indexed_db_key_path.cc +++ b/content/common/indexed_db/indexed_db_key_path.cc @@ -14,20 +14,20 @@ using blink::WebIDBKeyPathTypeString; IndexedDBKeyPath::IndexedDBKeyPath() : type_(WebIDBKeyPathTypeNull) {} -IndexedDBKeyPath::IndexedDBKeyPath(const string16& string) +IndexedDBKeyPath::IndexedDBKeyPath(const base::string16& string) : type_(WebIDBKeyPathTypeString), string_(string) {} -IndexedDBKeyPath::IndexedDBKeyPath(const std::vector<string16>& array) +IndexedDBKeyPath::IndexedDBKeyPath(const std::vector<base::string16>& array) : type_(WebIDBKeyPathTypeArray), array_(array) {} IndexedDBKeyPath::~IndexedDBKeyPath() {} -const std::vector<string16>& IndexedDBKeyPath::array() const { +const std::vector<base::string16>& IndexedDBKeyPath::array() const { DCHECK(type_ == blink::WebIDBKeyPathTypeArray); return array_; } -const string16& IndexedDBKeyPath::string() const { +const base::string16& IndexedDBKeyPath::string() const { DCHECK(type_ == blink::WebIDBKeyPathTypeString); return string_; } diff --git a/content/common/indexed_db/indexed_db_key_path.h b/content/common/indexed_db/indexed_db_key_path.h index a17c193..ec5e861 100644 --- a/content/common/indexed_db/indexed_db_key_path.h +++ b/content/common/indexed_db/indexed_db_key_path.h @@ -17,21 +17,21 @@ namespace content { class CONTENT_EXPORT IndexedDBKeyPath { public: IndexedDBKeyPath(); // Defaults to blink::WebIDBKeyPathTypeNull. - explicit IndexedDBKeyPath(const string16&); - explicit IndexedDBKeyPath(const std::vector<string16>&); + explicit IndexedDBKeyPath(const base::string16&); + explicit IndexedDBKeyPath(const std::vector<base::string16>&); ~IndexedDBKeyPath(); bool IsNull() const { return type_ == blink::WebIDBKeyPathTypeNull; } bool operator==(const IndexedDBKeyPath& other) const; blink::WebIDBKeyPathType type() const { return type_; } - const std::vector<string16>& array() const; - const string16& string() const; + const std::vector<base::string16>& array() const; + const base::string16& string() const; private: blink::WebIDBKeyPathType type_; - string16 string_; - std::vector<string16> array_; + base::string16 string_; + std::vector<base::string16> array_; }; } // namespace content diff --git a/content/common/indexed_db/indexed_db_key_unittest.cc b/content/common/indexed_db/indexed_db_key_unittest.cc index 7116062..ca52cc4 100644 --- a/content/common/indexed_db/indexed_db_key_unittest.cc +++ b/content/common/indexed_db/indexed_db_key_unittest.cc @@ -32,7 +32,7 @@ TEST(IndexedDBKeyTest, KeySizeEstimates) { keys.push_back(IndexedDBKey(date, blink::WebIDBKeyTypeDate)); estimates.push_back(static_cast<size_t>(24)); // Overhead + sizeof(double). - const string16 string(1024, static_cast<char16>('X')); + const base::string16 string(1024, static_cast<char16>('X')); keys.push_back(IndexedDBKey(string)); // Overhead + string length * sizeof(char16). estimates.push_back(static_cast<size_t>(2064)); diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h index 3fb9533..047fd0c 100644 --- a/content/common/indexed_db/indexed_db_messages.h +++ b/content/common/indexed_db/indexed_db_messages.h @@ -45,7 +45,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params) // The string id of the origin doing the initiating. IPC_STRUCT_MEMBER(std::string, database_identifier) // The name of the database. - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) // The transaction id used if a database upgrade is needed. IPC_STRUCT_MEMBER(int64, transaction_id) // The requested version of the database. @@ -60,7 +60,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params) // The string id of the origin doing the initiating. IPC_STRUCT_MEMBER(std::string, database_identifier) // The name of the database. - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) IPC_STRUCT_END() IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params) @@ -86,7 +86,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) // The storage id of the object store. IPC_STRUCT_MEMBER(int64, object_store_id) // The name of the object store. - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) // The keyPath of the object store. IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) // Whether the object store created should have a key generator. @@ -219,7 +219,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params) // The storage id of the index. IPC_STRUCT_MEMBER(int64, index_id) // The name of the index. - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) // The keyPath of the index. IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) // Whether the index created has unique keys. @@ -257,7 +257,7 @@ IPC_STRUCT_END() IPC_STRUCT_BEGIN(IndexedDBIndexMetadata) IPC_STRUCT_MEMBER(int64, id) - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath) IPC_STRUCT_MEMBER(bool, unique) IPC_STRUCT_MEMBER(bool, multiEntry) @@ -265,7 +265,7 @@ IPC_STRUCT_END() IPC_STRUCT_BEGIN(IndexedDBObjectStoreMetadata) IPC_STRUCT_MEMBER(int64, id) - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath) IPC_STRUCT_MEMBER(bool, autoIncrement) IPC_STRUCT_MEMBER(int64, max_index_id) @@ -274,8 +274,8 @@ IPC_STRUCT_END() IPC_STRUCT_BEGIN(IndexedDBDatabaseMetadata) IPC_STRUCT_MEMBER(int64, id) - IPC_STRUCT_MEMBER(string16, name) - IPC_STRUCT_MEMBER(string16, version) + IPC_STRUCT_MEMBER(base::string16, name) + IPC_STRUCT_MEMBER(base::string16, version) IPC_STRUCT_MEMBER(int64, int_version) IPC_STRUCT_MEMBER(int64, max_object_store_id) IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) @@ -341,12 +341,12 @@ IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined, IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList, int32 /* ipc_thread_id */, int32 /* ipc_callbacks_id */, - std::vector<string16> /* dom_string_list */) + std::vector<base::string16> /* dom_string_list */) IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError, int32 /* ipc_thread_id */, int32 /* ipc_callbacks_id */, int /* code */, - string16 /* message */) + base::string16 /* message */) IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked, int32 /* ipc_thread_id */, int32 /* ipc_callbacks_id */) @@ -371,7 +371,7 @@ IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort, int32, /* ipc_database_callbacks_id */ int64, /* transaction_id */ int, /* code */ - string16) /* message */ + base::string16) /* message */ IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete, int32, /* ipc_thread_id */ int32, /* ipc_database_callbacks_id */ diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc index 94b2053..0a566e2 100644 --- a/content/common/indexed_db/indexed_db_param_traits.cc +++ b/content/common/indexed_db/indexed_db_param_traits.cc @@ -82,7 +82,7 @@ bool ParamTraits<IndexedDBKey>::Read(const Message* m, return true; } case WebIDBKeyTypeString: { - string16 string; + base::string16 string; if (!ReadParam(m, iter, &string)) return false; *r = IndexedDBKey(string); @@ -156,14 +156,14 @@ bool ParamTraits<IndexedDBKeyPath>::Read(const Message* m, switch (type) { case WebIDBKeyPathTypeArray: { - std::vector<string16> array; + std::vector<base::string16> array; if (!ReadParam(m, iter, &array)) return false; *r = IndexedDBKeyPath(array); return true; } case WebIDBKeyPathTypeString: { - string16 string; + base::string16 string; if (!ReadParam(m, iter, &string)) return false; *r = IndexedDBKeyPath(string); @@ -184,7 +184,7 @@ void ParamTraits<IndexedDBKeyPath>::Log(const param_type& p, std::string* l) { LogParam(p.string(), l); l->append(", "); l->append("["); - std::vector<string16>::const_iterator it = p.array().begin(); + std::vector<base::string16>::const_iterator it = p.array().begin(); while (it != p.array().end()) { LogParam(*it, l); ++it; diff --git a/content/common/input_messages.h b/content/common/input_messages.h index 57e51ce..230e851 100644 --- a/content/common/input_messages.h +++ b/content/common/input_messages.h @@ -131,10 +131,10 @@ IPC_MESSAGE_ROUTED0(InputMsg_PasteAndMatchStyle) // Replaces the selected region or a word around the cursor with the // specified string. IPC_MESSAGE_ROUTED1(InputMsg_Replace, - string16) + base::string16) // Replaces the misspelling in the selected region with the specified string. IPC_MESSAGE_ROUTED1(InputMsg_ReplaceMisspelling, - string16) + base::string16) IPC_MESSAGE_ROUTED0(InputMsg_Delete) IPC_MESSAGE_ROUTED0(InputMsg_SelectAll) diff --git a/content/common/java_bridge_messages.h b/content/common/java_bridge_messages.h index 7f2d8c1..6bb8116 100644 --- a/content/common/java_bridge_messages.h +++ b/content/common/java_bridge_messages.h @@ -18,12 +18,12 @@ // Sent from browser to renderer to add a Java object with the given name. IPC_MESSAGE_ROUTED2(JavaBridgeMsg_AddNamedObject, - string16 /* name */, + base::string16 /* name */, content::NPVariant_Param) /* object */ // Sent from browser to renderer to remove a Java object with the given name. IPC_MESSAGE_ROUTED1(JavaBridgeMsg_RemoveNamedObject, - string16 /* name */) + base::string16 /* name */) // Sent from renderer to browser to request a route ID for a renderer-side (ie // JavaScript) object. diff --git a/content/common/mac/attributed_string_coder.h b/content/common/mac/attributed_string_coder.h index 629beed..35b3bf5 100644 --- a/content/common/mac/attributed_string_coder.h +++ b/content/common/mac/attributed_string_coder.h @@ -62,12 +62,12 @@ class CONTENT_EXPORT AttributedStringCoder { // which can be serialized over IPC. class EncodedString { public: - explicit EncodedString(string16 string); + explicit EncodedString(base::string16 string); EncodedString(); ~EncodedString(); // Accessors: - string16 string() const { return string_; } + base::string16 string() const { return string_; } const std::vector<FontAttribute>& attributes() const { return attributes_; } @@ -75,7 +75,7 @@ class CONTENT_EXPORT AttributedStringCoder { private: // The plain-text string. - string16 string_; + base::string16 string_; // The set of attributes that style |string_|. std::vector<FontAttribute> attributes_; }; diff --git a/content/common/mac/attributed_string_coder.mm b/content/common/mac/attributed_string_coder.mm index ba6eca5..f14103b 100644 --- a/content/common/mac/attributed_string_coder.mm +++ b/content/common/mac/attributed_string_coder.mm @@ -65,7 +65,7 @@ NSAttributedString* AttributedStringCoder::Decode( // Data Types ////////////////////////////////////////////////////////////////// -AttributedStringCoder::EncodedString::EncodedString(string16 string) +AttributedStringCoder::EncodedString::EncodedString(base::string16 string) : string_(string) { } @@ -129,7 +129,7 @@ bool ParamTraits<AttributedStringCoder::EncodedString>::Read( const Message* m, PickleIterator* iter, param_type* p) { bool success = true; - string16 result; + base::string16 result; success &= ReadParam(m, iter, &result); *p = AttributedStringCoder::EncodedString(result); diff --git a/content/common/mac/font_descriptor.h b/content/common/mac/font_descriptor.h index f47eb22..219f1fb 100644 --- a/content/common/mac/font_descriptor.h +++ b/content/common/mac/font_descriptor.h @@ -17,7 +17,7 @@ class NSFont; // Container to allow serializing an NSFont over IPC. struct CONTENT_EXPORT FontDescriptor { explicit FontDescriptor(NSFont* font); - FontDescriptor(string16 name, float size); + FontDescriptor(base::string16 name, float size); FontDescriptor() : font_point_size(0) {} @@ -25,7 +25,7 @@ struct CONTENT_EXPORT FontDescriptor { NSFont* ToNSFont() const; // Name of the font. - string16 font_name; + base::string16 font_name; // Size in points. float font_point_size; diff --git a/content/common/mac/font_descriptor.mm b/content/common/mac/font_descriptor.mm index 3b5a577..e5c04c1 100644 --- a/content/common/mac/font_descriptor.mm +++ b/content/common/mac/font_descriptor.mm @@ -13,7 +13,7 @@ FontDescriptor::FontDescriptor(NSFont* font) { font_point_size = [font pointSize]; } -FontDescriptor::FontDescriptor(string16 name, float size) { +FontDescriptor::FontDescriptor(base::string16 name, float size) { font_name = name; font_point_size = size; } diff --git a/content/common/message_port_messages.h b/content/common/message_port_messages.h index 67b729d..4269ade 100644 --- a/content/common/message_port_messages.h +++ b/content/common/message_port_messages.h @@ -25,7 +25,7 @@ #ifndef CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_ #define CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_ -typedef std::pair<string16, std::vector<int> > QueuedMessage; +typedef std::pair<base::string16, std::vector<int> > QueuedMessage; #endif // CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_ @@ -35,7 +35,7 @@ typedef std::pair<string16, std::vector<int> > QueuedMessage; // Sends a message to a message port. IPC_MESSAGE_ROUTED3(MessagePortMsg_Message, - string16 /* message */, + base::string16 /* message */, std::vector<int> /* sent_message_port_ids */, std::vector<int> /* new_routing_ids */) @@ -62,7 +62,7 @@ IPC_MESSAGE_CONTROL1(MessagePortHostMsg_DestroyMessagePort, // as well if sent_message_port_id != MSG_ROUTING_NONE. IPC_MESSAGE_CONTROL3(MessagePortHostMsg_PostMessage, int /* sender_message_port_id */, - string16 /* message */, + base::string16 /* message */, std::vector<int> /* sent_message_port_ids */) // Causes messages sent to the remote port to be delivered to this local port. diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc index f5c86f7..cf13a1d 100644 --- a/content/common/sandbox_win.cc +++ b/content/common/sandbox_win.cc @@ -217,7 +217,7 @@ void AddGenericDllEvictionPolicy(sandbox::TargetPolicy* policy) { } // Returns the object path prepended with the current logon session. -string16 PrependWindowsSessionPath(const char16* object) { +base::string16 PrependWindowsSessionPath(const char16* object) { // Cache this because it can't change after process creation. static uintptr_t s_session_id = 0; if (s_session_id == 0) { @@ -514,7 +514,7 @@ void SetJobLevel(const CommandLine& cmd_line, // Just have to figure out what needs to be warmed up first. void AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy) { // TODO(cpu): Add back the BaseNamedObjects policy. - string16 object_path = PrependWindowsSessionPath( + base::string16 object_path = PrependWindowsSessionPath( L"\\BaseNamedObjects\\windows_shell_global_counters"); policy->AddKernelObjectToClose(L"Section", object_path.data()); } diff --git a/content/common/service_worker_messages.h b/content/common/service_worker_messages.h index f5fe5dc..d2a5eb2 100644 --- a/content/common/service_worker_messages.h +++ b/content/common/service_worker_messages.h @@ -49,7 +49,7 @@ IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, int32 /* thread_id */, int32 /* request_id */, blink::WebServiceWorkerError::ErrorType /* code */, - string16 /* message */) + base::string16 /* message */) // Informs the browser of a new ServiceWorkerProvider in the child process, // |provider_id| is unique within its child process. diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 2e8d41a..3ff33ca 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -338,7 +338,7 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) // The name of the resulting frame that should be created (empty if none // has been specified). - IPC_STRUCT_MEMBER(string16, frame_name) + IPC_STRUCT_MEMBER(base::string16, frame_name) // The frame identifier of the frame initiating the open. IPC_STRUCT_MEMBER(int64, opener_frame_id) @@ -373,7 +373,7 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) // The additional window features to use for the new view. We pass these // separately from |features| above because we cannot serialize WebStrings // over IPC. - IPC_STRUCT_MEMBER(std::vector<string16>, additional_features) + IPC_STRUCT_MEMBER(std::vector<base::string16>, additional_features) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params) @@ -381,7 +381,7 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params) IPC_STRUCT_MEMBER(GURL, url) // Name for a SharedWorker, otherwise empty string. - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) // The ID of the parent document (unique within parent renderer). IPC_STRUCT_MEMBER(unsigned long long, document_id) @@ -417,14 +417,14 @@ IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params) // The frame ID for the failure report. IPC_STRUCT_MEMBER(int64, frame_id) // The WebFrame's uniqueName(). - IPC_STRUCT_MEMBER(string16, frame_unique_name) + IPC_STRUCT_MEMBER(base::string16, frame_unique_name) // True if this is the top-most frame. IPC_STRUCT_MEMBER(bool, is_main_frame) // Error code as reported in the DidFailProvisionalLoad callback. IPC_STRUCT_MEMBER(int, error_code) // An error message generated from the error_code. This can be an empty // string if we were unable to find a meaningful description. - IPC_STRUCT_MEMBER(string16, error_description) + IPC_STRUCT_MEMBER(base::string16, error_description) // The URL that the error is reported for. IPC_STRUCT_MEMBER(GURL, url) // True if the failure is the result of navigating to a POST again @@ -442,7 +442,7 @@ IPC_STRUCT_BEGIN_WITH_PARENT(ViewHostMsg_FrameNavigate_Params, IPC_STRUCT_MEMBER(int64, frame_id) // The WebFrame's uniqueName(). - IPC_STRUCT_MEMBER(string16, frame_unique_name) + IPC_STRUCT_MEMBER(base::string16, frame_unique_name) // Information regarding the security of the connection (empty if the // connection was not secure). @@ -735,7 +735,7 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params) IPC_STRUCT_MEMBER(int64, session_storage_namespace_id) // The name of the frame associated with this view (or empty if none). - IPC_STRUCT_MEMBER(string16, frame_name) + IPC_STRUCT_MEMBER(base::string16, frame_name) // The route ID of the opener RenderView if we need to set one // (MSG_ROUTING_NONE otherwise). @@ -766,7 +766,7 @@ IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params) // The serialized script value. - IPC_STRUCT_MEMBER(string16, data) + IPC_STRUCT_MEMBER(base::string16, data) // When sent to the browser, this is the routing ID of the source frame in // the source process. The browser replaces it with the routing ID of the @@ -774,10 +774,10 @@ IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params) IPC_STRUCT_MEMBER(int, source_routing_id) // The origin of the source frame. - IPC_STRUCT_MEMBER(string16, source_origin) + IPC_STRUCT_MEMBER(base::string16, source_origin) // The origin for the message's target. - IPC_STRUCT_MEMBER(string16, target_origin) + IPC_STRUCT_MEMBER(base::string16, target_origin) // Information about the MessagePorts this message contains. IPC_STRUCT_MEMBER(std::vector<int>, message_port_ids) @@ -961,7 +961,7 @@ IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame) // Sent when the user wants to search for a word on the page (find in page). IPC_MESSAGE_ROUTED3(ViewMsg_Find, int /* request_id */, - string16 /* search_text */, + base::string16 /* search_text */, blink::WebFindOptions) // This message notifies the renderer that the user has closed the FindInPage @@ -1020,8 +1020,8 @@ IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt, // ViewHostMsg_ScriptEvalResponse is passed the ID parameter so that the // client can uniquely identify the request. IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest, - string16, /* frame_xpath */ - string16, /* jscript_url */ + base::string16, /* frame_xpath */ + base::string16, /* jscript_url */ int, /* ID */ bool /* If true, result is sent back. */) @@ -1036,7 +1036,7 @@ IPC_MESSAGE_ROUTED0(ViewMsg_DisownOpener) // into that frame's document. See ViewMsg_ScriptEvalRequest for details on // allowed xpath expressions. IPC_MESSAGE_ROUTED2(ViewMsg_CSSInsertRequest, - string16, /* frame_xpath */ + base::string16, /* frame_xpath */ std::string /* css string */) // Change the zoom level for the current main frame. If the level actually @@ -1113,14 +1113,14 @@ IPC_MESSAGE_ROUTED0(ViewMsg_CandidateWindowHidden) // This message sends a string being composed with an input method. IPC_MESSAGE_ROUTED4( ViewMsg_ImeSetComposition, - string16, /* text */ + base::string16, /* text */ std::vector<blink::WebCompositionUnderline>, /* underlines */ int, /* selectiont_start */ int /* selection_end */) // This message confirms an ongoing composition. IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition, - string16 /* text */, + base::string16 /* text */, gfx::Range /* replacement_range */, bool /* keep_selection */) @@ -1376,7 +1376,7 @@ IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, // Tell the renderer that plugin IME has completed. IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, - string16 /* text */, + base::string16 /* text */, int /* plugin_id */) // External popup menus. @@ -1584,7 +1584,7 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad, // title changes. IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle, int32 /* page_id */, - string16 /* title */, + base::string16 /* title */, blink::WebTextDirection /* title direction */) // Change the encoding name of the page in UI when the page has detected @@ -1649,7 +1649,7 @@ IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailLoadWithError, GURL /* validated_url */, bool /* is_main_frame */, int /* error_code */, - string16 /* error_description */) + base::string16 /* error_description */) // Sent when the renderer fails a provisional load with an error. IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFailProvisionalLoadWithError, @@ -1811,7 +1811,7 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed, IPC_MESSAGE_ROUTED3(ViewHostMsg_DownloadUrl, GURL /* url */, content::Referrer /* referrer */, - string16 /* suggested_name */) + base::string16 /* suggested_name */) // Used to go to the session history entry at the given offset (ie, -1 will // return the "back" item). @@ -1828,12 +1828,12 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent, ViewMsg_PostMessage_Params) IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage, - string16 /* in - alert message */, - string16 /* in - default prompt */, + base::string16 /* in - alert message */, + base::string16 /* in - default prompt */, GURL /* in - originating page URL */, content::JavaScriptMessageType /* in - type */, bool /* out - success */, - string16 /* out - user_input field */) + base::string16 /* out - user_input field */) // Requests that the given URL be opened in the specified manner. IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenURL, ViewHostMsg_OpenURL_Params) @@ -1962,7 +1962,7 @@ IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer, // Send the tooltip text for the current mouse position to the browser. IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, - string16 /* tooltip text string */, + base::string16 /* tooltip text string */, blink::WebTextDirection /* text direction hint */) IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK) @@ -1972,7 +1972,7 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK) // Note: The secound parameter is the character based offset of the string16 // text in the document. IPC_MESSAGE_ROUTED3(ViewHostMsg_SelectionChanged, - string16 /* text covers the selection range */, + base::string16 /* text covers the selection range */, size_t /* the offset of the text in the document */, gfx::Range /* selection range in the document */) @@ -2032,9 +2032,9 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_ImeCancelComposition) // or debugger UI. IPC_MESSAGE_ROUTED4(ViewHostMsg_AddMessageToConsole, int32, /* log level */ - string16, /* msg */ + base::string16, /* msg */ int32, /* line number */ - string16 /* source id */ ) + base::string16 /* source id */ ) // Sent by the renderer process to indicate that a plugin instance has crashed. // Note: |plugin_pid| should not be trusted. The corresponding process has @@ -2049,11 +2049,11 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_CrashedPlugin, // page. Replies true if yes, false otherwise, the reply string is ignored, // but is included so that we can use OnJavaScriptMessageBoxClosed. IPC_SYNC_MESSAGE_ROUTED3_2(ViewHostMsg_RunBeforeUnloadConfirm, - GURL, /* in - originating frame URL */ - string16 /* in - alert message */, - bool /* in - is a reload */, - bool /* out - success */, - string16 /* out - This is ignored.*/) + GURL, /* in - originating frame URL */ + base::string16 /* in - alert message */, + bool /* in - is a reload */, + bool /* out - success */, + base::string16 /* out - This is ignored.*/) // Sent when a provisional load on the main frame redirects. IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad, @@ -2152,7 +2152,7 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory) IPC_MESSAGE_ROUTED4(ViewHostMsg_RegisterProtocolHandler, std::string /* scheme */, GURL /* url */, - string16 /* title */, + base::string16 /* title */, bool /* user_gesture */) // Stores new inspector setting in the profile. @@ -2343,7 +2343,7 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) // for details. IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, LOGFONT /* font_data */, - string16 /* characters */) + base::string16 /* characters */) #endif #if defined(OS_POSIX) diff --git a/content/common/worker_messages.h b/content/common/worker_messages.h index e50099d5..6145f80 100644 --- a/content/common/worker_messages.h +++ b/content/common/worker_messages.h @@ -31,15 +31,15 @@ IPC_STRUCT_BEGIN(WorkerHostMsg_PostConsoleMessageToWorkerObject_Params) IPC_STRUCT_MEMBER(int, source_identifier) IPC_STRUCT_MEMBER(int, message_type) IPC_STRUCT_MEMBER(int, message_level) - IPC_STRUCT_MEMBER(string16, message) + IPC_STRUCT_MEMBER(base::string16, message) IPC_STRUCT_MEMBER(int, line_number) - IPC_STRUCT_MEMBER(string16, source_url) + IPC_STRUCT_MEMBER(base::string16, source_url) IPC_STRUCT_END() // Parameter structure for WorkerProcessMsg_CreateWorker. IPC_STRUCT_BEGIN(WorkerProcessMsg_CreateWorker_Params) IPC_STRUCT_MEMBER(GURL, url) - IPC_STRUCT_MEMBER(string16, name) + IPC_STRUCT_MEMBER(base::string16, name) IPC_STRUCT_MEMBER(int, route_id) IPC_STRUCT_MEMBER(int, creator_process_id) IPC_STRUCT_MEMBER(int64, shared_worker_appcache_id) @@ -62,8 +62,8 @@ IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker, IPC_SYNC_MESSAGE_CONTROL5_1(WorkerProcessHostMsg_AllowDatabase, int /* worker_route_id */, GURL /* origin url */, - string16 /* database name */, - string16 /* database display name */, + base::string16 /* database name */, + base::string16 /* database display name */, unsigned long /* estimated size */, bool /* result */) @@ -77,7 +77,7 @@ IPC_SYNC_MESSAGE_CONTROL2_1(WorkerProcessHostMsg_AllowFileSystem, IPC_SYNC_MESSAGE_CONTROL3_1(WorkerProcessHostMsg_AllowIndexedDB, int /* worker_route_id */, GURL /* origin url */, - string16 /* database name */, + base::string16 /* database name */, bool /* result */) // Sent by the worker process to request being killed. @@ -89,9 +89,9 @@ IPC_SYNC_MESSAGE_CONTROL0_0(WorkerProcessHostMsg_ForceKillWorker) // These are messages sent from the renderer process to the worker process. IPC_MESSAGE_ROUTED5(WorkerMsg_StartWorkerContext, GURL /* url */, - string16 /* user_agent */, - string16 /* source_code */, - string16 /* content_security_policy */, + base::string16 /* user_agent */, + base::string16 /* source_code */, + base::string16 /* content_security_policy */, blink::WebContentSecurityPolicyType) IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc index 528d513..72fd3cb 100644 --- a/content/plugin/plugin_thread.cc +++ b/content/plugin/plugin_thread.cc @@ -123,7 +123,7 @@ PluginThread::PluginThread() } GetContentClient()->plugin()->PluginProcessStarted( - plugin.get() ? plugin->plugin_info().name : string16()); + plugin.get() ? plugin->plugin_info().name : base::string16()); // Certain plugins, such as flash, steal the unhandled exception filter // thus we never get crash reports when they fault. This call fixes it. diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc index c31ae2a..fd4827d 100644 --- a/content/plugin/webplugin_delegate_stub.cc +++ b/content/plugin/webplugin_delegate_stub.cc @@ -317,7 +317,8 @@ void WebPluginDelegateStub::OnGetPluginScriptableObject(int* route_id) { WebBindings::releaseObject(object); } -void WebPluginDelegateStub::OnGetFormValue(string16* value, bool* success) { +void WebPluginDelegateStub::OnGetFormValue(base::string16* value, + bool* success) { *success = false; if (!delegate_) return; @@ -338,7 +339,7 @@ void WebPluginDelegateStub::OnSetContentAreaFocus(bool has_focus) { #if defined(OS_WIN) && !defined(USE_AURA) void WebPluginDelegateStub::OnImeCompositionUpdated( - const string16& text, + const base::string16& text, const std::vector<int>& clauses, const std::vector<int>& target, int cursor_position) { @@ -349,7 +350,8 @@ void WebPluginDelegateStub::OnImeCompositionUpdated( #endif } -void WebPluginDelegateStub::OnImeCompositionCompleted(const string16& text) { +void WebPluginDelegateStub::OnImeCompositionCompleted( + const base::string16& text) { if (delegate_) delegate_->ImeCompositionCompleted(text); } @@ -382,7 +384,8 @@ void WebPluginDelegateStub::OnWindowFrameChanged(const gfx::Rect& window_frame, delegate_->WindowFrameChanged(window_frame, view_frame); } -void WebPluginDelegateStub::OnImeCompositionCompleted(const string16& text) { +void WebPluginDelegateStub::OnImeCompositionCompleted( + const base::string16& text) { if (delegate_) delegate_->ImeCompositionCompleted(text); } diff --git a/content/plugin/webplugin_delegate_stub.h b/content/plugin/webplugin_delegate_stub.h index 09bcf3d..8787f25 100644 --- a/content/plugin/webplugin_delegate_stub.h +++ b/content/plugin/webplugin_delegate_stub.h @@ -79,15 +79,15 @@ class WebPluginDelegateStub : public IPC::Listener, const std::string& result, bool success, int notify_id); - void OnGetFormValue(string16* value, bool* success); + void OnGetFormValue(base::string16* value, bool* success); void OnSetContentAreaFocus(bool has_focus); #if defined(OS_WIN) && !defined(USE_AURA) - void OnImeCompositionUpdated(const string16& text, + void OnImeCompositionUpdated(const base::string16& text, const std::vector<int>& clauses, const std::vector<int>& target, int cursor_position); - void OnImeCompositionCompleted(const string16& text); + void OnImeCompositionCompleted(const base::string16& text); #endif #if defined(OS_MACOSX) void OnSetWindowFocus(bool has_focus); @@ -96,7 +96,7 @@ class WebPluginDelegateStub : public IPC::Listener, bool has_focus); void OnWindowFrameChanged(const gfx::Rect& window_frame, const gfx::Rect& view_frame); - void OnImeCompositionCompleted(const string16& text); + void OnImeCompositionCompleted(const base::string16& text); #endif void OnDidReceiveManualResponse( diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index c8774a1..a668af6 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -146,10 +146,10 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, // Tells the View that the tooltip text for the current mouse position over // the page has changed. - virtual void SetTooltipText(const string16& tooltip_text) = 0; + virtual void SetTooltipText(const base::string16& tooltip_text) = 0; // Notifies the View that the renderer text selection has changed. - virtual void SelectionChanged(const string16& text, + virtual void SelectionChanged(const base::string16& text, size_t offset, const gfx::Range& range) = 0; diff --git a/content/port/browser/web_contents_view_port.h b/content/port/browser/web_contents_view_port.h index 12c3083..fef0b3c 100644 --- a/content/port/browser/web_contents_view_port.h +++ b/content/port/browser/web_contents_view_port.h @@ -35,7 +35,7 @@ class CONTENT_EXPORT WebContentsViewPort : public WebContentsView { // is not strictly necessary and isn't expected to be displayed anywhere, but // can aid certain debugging tools such as Spy++ on Windows where you are // trying to find a specific window. - virtual void SetPageTitle(const string16& title) = 0; + virtual void SetPageTitle(const base::string16& title) = 0; // Invoked when the WebContents is notified that the RenderView has been // fully created. diff --git a/content/public/browser/access_token_store.h b/content/public/browser/access_token_store.h index 0af3fe7..bd13014 100644 --- a/content/public/browser/access_token_store.h +++ b/content/public/browser/access_token_store.h @@ -33,7 +33,7 @@ namespace content { class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore> { public: // Map of server URLs to associated access token. - typedef std::map<GURL, string16> AccessTokenSet; + typedef std::map<GURL, base::string16> AccessTokenSet; typedef base::Callback<void(AccessTokenSet, net::URLRequestContextGetter*)> LoadAccessTokensCallbackType; @@ -47,7 +47,7 @@ class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore> { const LoadAccessTokensCallbackType& callback) = 0; virtual void SaveAccessToken( - const GURL& server_url, const string16& access_token) = 0; + const GURL& server_url, const base::string16& access_token) = 0; protected: friend class base::RefCountedThreadSafe<AccessTokenStore>; diff --git a/content/public/browser/browser_child_process_host.h b/content/public/browser/browser_child_process_host.h index e618ad7..7776a0d 100644 --- a/content/public/browser/browser_child_process_host.h +++ b/content/public/browser/browser_child_process_host.h @@ -68,7 +68,7 @@ class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { bool known_dead, int* exit_code) = 0; // Sets the user-visible name of the process. - virtual void SetName(const string16& name) = 0; + virtual void SetName(const base::string16& name) = 0; // Set the handle of the process. BrowserChildProcessHost will do this when // the Launch method is used to start the process. However if the owner diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h index e8767e2..fd535df 100644 --- a/content/public/browser/browser_plugin_guest_delegate.h +++ b/content/public/browser/browser_plugin_guest_delegate.h @@ -26,9 +26,9 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate { // Add a message to the console. virtual void AddMessageToConsole(int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) {} + const base::string16& source_id) {} // Request the delegate to close this guest, and do whatever cleanup it needs // to do. diff --git a/content/public/browser/child_process_data.h b/content/public/browser/child_process_data.h index b669305..3683be9 100644 --- a/content/public/browser/child_process_data.h +++ b/content/public/browser/child_process_data.h @@ -18,7 +18,7 @@ struct ChildProcessData { // The name of the process. i.e. for plugins it might be Flash, while for // for workers it might be the domain that it's from. - string16 name; + base::string16 name; // The unique identifier for this child process. This identifier is NOT a // process ID, and will be unique for all types of child process for diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc index f105cc9..b404a97 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -141,8 +141,8 @@ bool ContentBrowserClient::AllowSaveLocalState(ResourceContext* context) { bool ContentBrowserClient::AllowWorkerDatabase( const GURL& url, - const string16& name, - const string16& display_name, + const base::string16& name, + const base::string16& display_name, unsigned long estimated_size, ResourceContext* context, const std::vector<std::pair<int, int> >& render_views) { @@ -158,7 +158,7 @@ bool ContentBrowserClient::AllowWorkerFileSystem( bool ContentBrowserClient::AllowWorkerIndexedDB( const GURL& url, - const string16& name, + const base::string16& name, ResourceContext* context, const std::vector<std::pair<int, int> >& render_views) { return true; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index bd3dc81..aae30eb 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -314,8 +314,8 @@ class CONTENT_EXPORT ContentBrowserClient { // This is called on the IO thread. virtual bool AllowWorkerDatabase( const GURL& url, - const string16& name, - const string16& display_name, + const base::string16& name, + const base::string16& display_name, unsigned long estimated_size, ResourceContext* context, const std::vector<std::pair<int, int> >& render_views); @@ -333,7 +333,7 @@ class CONTENT_EXPORT ContentBrowserClient { // This is called on the IO thread. virtual bool AllowWorkerIndexedDB( const GURL& url, - const string16& name, + const base::string16& name, ResourceContext* context, const std::vector<std::pair<int, int> >& render_views); diff --git a/content/public/browser/download_save_info.h b/content/public/browser/download_save_info.h index 6b7a14a..1f44911 100644 --- a/content/public/browser/download_save_info.h +++ b/content/public/browser/download_save_info.h @@ -27,7 +27,7 @@ struct CONTENT_EXPORT DownloadSaveInfo { // If non-empty, contains an untrusted filename suggestion. This can't contain // a path (only a filename), and is only effective if |file_path| is empty. - string16 suggested_name; + base::string16 suggested_name; // If non-NULL, contains the source data stream for the file contents. scoped_ptr<net::FileStream> file_stream; diff --git a/content/public/browser/download_url_parameters.h b/content/public/browser/download_url_parameters.h index a907f09..b48bc2a 100644 --- a/content/public/browser/download_url_parameters.h +++ b/content/public/browser/download_url_parameters.h @@ -89,7 +89,7 @@ class CONTENT_EXPORT DownloadUrlParameters { void set_file_path(const base::FilePath& file_path) { save_info_.file_path = file_path; } - void set_suggested_name(const string16& suggested_name) { + void set_suggested_name(const base::string16& suggested_name) { save_info_.suggested_name = suggested_name; } void set_offset(int64 offset) { save_info_.offset = offset; } @@ -126,7 +126,9 @@ class CONTENT_EXPORT DownloadUrlParameters { return resource_context_; } const base::FilePath& file_path() const { return save_info_.file_path; } - const string16& suggested_name() const { return save_info_.suggested_name; } + const base::string16& suggested_name() const { + return save_info_.suggested_name; + } int64 offset() const { return save_info_.offset; } const std::string& hash_state() const { return save_info_.hash_state; } bool prompt() const { return save_info_.prompt_for_save_location; } diff --git a/content/public/browser/javascript_dialog_manager.cc b/content/public/browser/javascript_dialog_manager.cc index 0a58d9f..ccc1f16 100644 --- a/content/public/browser/javascript_dialog_manager.cc +++ b/content/public/browser/javascript_dialog_manager.cc @@ -9,7 +9,7 @@ namespace content { bool JavaScriptDialogManager::HandleJavaScriptDialog( WebContents* web_contents, bool accept, - const string16* prompt_override) { + const base::string16* prompt_override) { return false; } diff --git a/content/public/browser/javascript_dialog_manager.h b/content/public/browser/javascript_dialog_manager.h index 778893d..cdc628b 100644 --- a/content/public/browser/javascript_dialog_manager.h +++ b/content/public/browser/javascript_dialog_manager.h @@ -23,7 +23,7 @@ class WebContents; class CONTENT_EXPORT JavaScriptDialogManager { public: typedef base::Callback<void(bool /* success */, - const string16& /* user_input */)> + const base::string16& /* user_input */)> DialogClosedCallback; // Displays a JavaScript dialog. |did_suppress_message| will not be nil; if @@ -33,14 +33,14 @@ class CONTENT_EXPORT JavaScriptDialogManager { const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) = 0; // Displays a dialog asking the user if they want to leave a page. virtual void RunBeforeUnloadDialog(WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) = 0; @@ -50,7 +50,7 @@ class CONTENT_EXPORT JavaScriptDialogManager { // dialog was handled. virtual bool HandleJavaScriptDialog(WebContents* web_contents, bool accept, - const string16* prompt_override); + const base::string16* prompt_override); // Cancels all active and pending dialogs for the given WebContents. virtual void CancelActiveAndPendingDialogs(WebContents* web_contents) = 0; diff --git a/content/public/browser/navigation_entry.h b/content/public/browser/navigation_entry.h index 1c7d343..e23773f 100644 --- a/content/public/browser/navigation_entry.h +++ b/content/public/browser/navigation_entry.h @@ -73,8 +73,8 @@ class NavigationEntry { // The caller is responsible for detecting when there is no title and // displaying the appropriate "Untitled" label if this is being displayed to // the user. - virtual void SetTitle(const string16& title) = 0; - virtual const string16& GetTitle() const = 0; + virtual void SetTitle(const base::string16& title) = 0; + virtual const base::string16& GetTitle() const = 0; // Page state is an opaque blob created by Blink that represents the state of // the page. This includes form entries and scroll position for each frame. @@ -99,7 +99,7 @@ class NavigationEntry { // the page if it is available or the URL. |languages| is the list of // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper // URL formatting isn't needed (e.g., unit tests). - virtual const string16& GetTitleForDisplay( + virtual const base::string16& GetTitleForDisplay( const std::string& languages) const = 0; // Returns true if the current tab is in view source mode. This will be false @@ -192,9 +192,11 @@ class NavigationEntry { // Set extra data on this NavigationEntry according to the specified |key|. // This data is not persisted by default. - virtual void SetExtraData(const std::string& key, const string16& data) = 0; + virtual void SetExtraData(const std::string& key, + const base::string16& data) = 0; // If present, fills the |data| present at the specified |key|. - virtual bool GetExtraData(const std::string& key, string16* data) const = 0; + virtual bool GetExtraData(const std::string& key, + base::string16* data) const = 0; // Removes the data at the specified |key|. virtual void ClearExtraData(const std::string& key) = 0; diff --git a/content/public/browser/plugin_service.h b/content/public/browser/plugin_service.h index 8c28948..76e6dda 100644 --- a/content/public/browser/plugin_service.h +++ b/content/public/browser/plugin_service.h @@ -89,7 +89,7 @@ class PluginService { // Returns the display name for the plugin identified by the given path. If // the path doesn't identify a plugin, or the plugin has no display name, // this will attempt to generate a display name from the path. - virtual string16 GetPluginDisplayNameByPath( + virtual base::string16 GetPluginDisplayNameByPath( const base::FilePath& plugin_path) = 0; // Asynchronously loads plugins if necessary and then calls back to the diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h index 2eed287..366ad0d 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h @@ -102,7 +102,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { int callback_context) = 0; virtual void DesktopNotificationPostDisplay(int callback_context) = 0; virtual void DesktopNotificationPostError(int notification_id, - const string16& message) = 0; + const base::string16& message) = 0; virtual void DesktopNotificationPostClose(int notification_id, bool by_user) = 0; virtual void DesktopNotificationPostClick(int notification_id) = 0; @@ -170,15 +170,15 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { const blink::WebMediaPlayerAction& action) = 0; // Runs some javascript within the context of a frame in the page. - virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, - const string16& jscript) = 0; + virtual void ExecuteJavascriptInWebFrame(const base::string16& frame_xpath, + const base::string16& jscript) = 0; // Runs some javascript within the context of a frame in the page. The result // is sent back via the provided callback. typedef base::Callback<void(const base::Value*)> JavascriptResultCallback; virtual void ExecuteJavascriptInWebFrameCallbackResult( - const string16& frame_xpath, - const string16& jscript, + const base::string16& frame_xpath, + const base::string16& jscript, const JavascriptResultCallback& callback) = 0; // Tells the renderer to perform the given action on the plugin located at @@ -190,7 +190,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void ExitFullscreen() = 0; // Finds text on a page. - virtual void Find(int request_id, const string16& search_text, + virtual void Find(int request_id, const base::string16& search_text, const blink::WebFindOptions& options) = 0; // Notifies the renderer that the user has closed the FindInPage window @@ -223,7 +223,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // Requests the renderer to evaluate an xpath to a frame and insert css // into that frame's document. - virtual void InsertCSS(const string16& frame_xpath, + virtual void InsertCSS(const base::string16& frame_xpath, const std::string& css) = 0; // Returns true if the RenderView is active and has not crashed. Virtual diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index 25fa41e..944ecbb 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h @@ -256,11 +256,11 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { // Makes an IPC call to tell webkit to replace the currently selected word // or a word around the cursor. - virtual void Replace(const string16& word) = 0; + virtual void Replace(const base::string16& word) = 0; // Makes an IPC call to tell webkit to replace the misspelling in the current // selection. - virtual void ReplaceMisspelling(const string16& word) = 0; + virtual void ReplaceMisspelling(const base::string16& word) = 0; // Called to notify the RenderWidget that the resize rect has changed without // the size of the RenderWidget itself changing. diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h index 6caba6d..d815cdf 100644 --- a/content/public/browser/render_widget_host_view.h +++ b/content/public/browser/render_widget_host_view.h @@ -105,7 +105,7 @@ class CONTENT_EXPORT RenderWidgetHostView { virtual void SetShowingContextMenu(bool showing) = 0; // Returns the currently selected text. - virtual string16 GetSelectedText() const = 0; + virtual base::string16 GetSelectedText() const = 0; // Subclasses should override this method to do what is appropriate to set // the custom background for their platform. diff --git a/content/public/browser/speech_recognition_manager.h b/content/public/browser/speech_recognition_manager.h index c6dacea..f6a76a2 100644 --- a/content/public/browser/speech_recognition_manager.h +++ b/content/public/browser/speech_recognition_manager.h @@ -80,7 +80,7 @@ class SpeechRecognitionManager { // Returns a human readable string for the model/make of the active audio // input device for this computer. - virtual string16 GetAudioInputDeviceModel() = 0; + virtual base::string16 GetAudioInputDeviceModel() = 0; // Invokes the platform provided microphone settings UI in a non-blocking way, // via the BrowserThread::FILE thread. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index 070966e..9bb2c83 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -222,7 +222,7 @@ class WebContents : public PageNavigator, // Returns the current navigation properties, which if a navigation is // pending may be provisional (e.g., the navigation could result in a // download, in which case the URL would revert to what it was previously). - virtual const string16& GetTitle() const = 0; + virtual const base::string16& GetTitle() const = 0; // The max page ID for any page that the current SiteInstance has loaded in // this WebContents. Page IDs are specific to a given SiteInstance and @@ -250,7 +250,7 @@ class WebContents : public PageNavigator, // Return the current load state and the URL associated with it. virtual const net::LoadStateWithParam& GetLoadState() const = 0; - virtual const string16& GetLoadStateHost() const = 0; + virtual const base::string16& GetLoadStateHost() const = 0; // Return the upload progress. virtual uint64 GetUploadSize() const = 0; diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc index f9e4951..63ad65b 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -41,9 +41,9 @@ bool WebContentsDelegate::ShouldSuppressDialogs() { bool WebContentsDelegate::AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { return false; } @@ -125,7 +125,7 @@ bool WebContentsDelegate::ShouldCreateWebContents( WebContents* web_contents, int route_id, WindowContainerType window_container_type, - const string16& frame_name, + const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, SessionStorageNamespace* session_storage_namespace) { diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index 18bd9ef..81faa6b 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -182,9 +182,9 @@ class CONTENT_EXPORT WebContentsDelegate { // will be used for the message. virtual bool AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id); + const base::string16& source_id); // Tells us that we've finished firing this tab's beforeunload event. // The proceed bool tells us whether the user chose to proceed closing the @@ -298,7 +298,7 @@ class CONTENT_EXPORT WebContentsDelegate { WebContents* web_contents, int route_id, WindowContainerType window_container_type, - const string16& frame_name, + const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -307,7 +307,7 @@ class CONTENT_EXPORT WebContentsDelegate { // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, int64 source_frame_id, - const string16& frame_name, + const base::string16& frame_name, const GURL& target_url, WebContents* new_contents) {} @@ -371,7 +371,7 @@ class CONTENT_EXPORT WebContentsDelegate { virtual void RegisterProtocolHandler(WebContents* web_contents, const std::string& protocol, const GURL& url, - const string16& title, + const base::string16& title, bool user_gesture) {} // Result of string search in the page. This includes the number of matches diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h index 5c7c935..469c9e5 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -126,7 +126,7 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, // this signal without a prior DidStartProvisionalLoadForFrame signal. virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& url, PageTransition transition_type, @@ -134,11 +134,11 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, // This method is invoked when the provisional load failed. virtual void DidFailProvisionalLoad(int64 frame_id, - const string16& frame_unique_name, + const base::string16& frame_unique_name, bool is_main_frame, const GURL& validated_url, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) {} // If the provisional load corresponded to the main frame, this method is @@ -184,7 +184,7 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, const GURL& validated_url, bool is_main_frame, int error_code, - const string16& error_description, + const base::string16& error_description, RenderViewHost* render_view_host) {} // This method is invoked when content was loaded from an in-memory cache. diff --git a/content/public/browser/web_drag_dest_delegate.h b/content/public/browser/web_drag_dest_delegate.h index cca3d2e..a556b88 100644 --- a/content/public/browser/web_drag_dest_delegate.h +++ b/content/public/browser/web_drag_dest_delegate.h @@ -55,7 +55,7 @@ class WebDragDestDelegate { // drag. Not every drag will trigger these. virtual void OnReceiveDataFromGtk(GtkSelectionData* data) = 0; virtual void OnReceiveProcessedData(const GURL& url, - const string16& title) = 0; + const base::string16& title) = 0; #elif defined(USE_AURA) // Called at the start of every drag to supply the data associated with the // drag. diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h index 3dad85c..5427673 100644 --- a/content/public/browser/web_ui.h +++ b/content/public/browser/web_ui.h @@ -41,7 +41,7 @@ class CONTENT_EXPORT WebUI { // Returns JavaScript code that, when executed, calls the function specified // by |function_name| with the arguments specified in |arg_list|. - static string16 GetJavascriptCall( + static base::string16 GetJavascriptCall( const std::string& function_name, const std::vector<const base::Value*>& arg_list); @@ -60,8 +60,8 @@ class CONTENT_EXPORT WebUI { // Gets a custom tab title provided by the Web UI. If there is no title // override, the string will be empty which should trigger the default title // behavior for the tab. - virtual const string16& GetOverriddenTitle() const = 0; - virtual void OverrideTitle(const string16& title) = 0; + virtual const base::string16& GetOverriddenTitle() const = 0; + virtual void OverrideTitle(const base::string16& title) = 0; // Returns the transition type that should be used for link clicks on this // Web UI. This will default to LINK but may be overridden. diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h index 8348de3..b5cc6d5 100644 --- a/content/public/browser/web_ui_data_source.h +++ b/content/public/browser/web_ui_data_source.h @@ -30,7 +30,8 @@ class WebUIDataSource { WebUIDataSource* source); // Adds a string keyed to its name to our dictionary. - virtual void AddString(const std::string& name, const string16& value) = 0; + virtual void AddString(const std::string& name, + const base::string16& value) = 0; // Adds a string keyed to its name to our dictionary. virtual void AddString(const std::string& name, const std::string& value) = 0; diff --git a/content/public/browser/web_ui_message_handler.h b/content/public/browser/web_ui_message_handler.h index 18fdd94..20a6072 100644 --- a/content/public/browser/web_ui_message_handler.h +++ b/content/public/browser/web_ui_message_handler.h @@ -46,7 +46,7 @@ class CONTENT_EXPORT WebUIMessageHandler { double* out_value); // Extract a string value from a list Value. - static string16 ExtractStringValue(const base::ListValue* value); + static base::string16 ExtractStringValue(const base::ListValue* value); // This is where subclasses specify which messages they'd like to handle and // perform any additional initialization.. At this point web_ui() will return diff --git a/content/public/browser/worker_service.h b/content/public/browser/worker_service.h index 10740fa..7ce2bf4 100644 --- a/content/public/browser/worker_service.h +++ b/content/public/browser/worker_service.h @@ -31,7 +31,7 @@ class WorkerService { struct WorkerInfo { GURL url; - string16 name; + base::string16 name; int process_id; int route_id; base::ProcessHandle handle; diff --git a/content/public/browser/worker_service_observer.h b/content/public/browser/worker_service_observer.h index ff6c8ef..9c1e055 100644 --- a/content/public/browser/worker_service_observer.h +++ b/content/public/browser/worker_service_observer.h @@ -15,7 +15,7 @@ namespace content { class WorkerServiceObserver { public: virtual void WorkerCreated(const GURL& url, - const string16& name, + const base::string16& name, int process_id, int route_id) {} virtual void WorkerDestroyed(int process_id, int route_id) {} diff --git a/content/public/common/content_client.cc b/content/public/common/content_client.cc index d4d00c0..54db517 100644 --- a/content/public/common/content_client.cc +++ b/content/public/common/content_client.cc @@ -89,8 +89,8 @@ std::string ContentClient::GetUserAgent() const { return std::string(); } -string16 ContentClient::GetLocalizedString(int message_id) const { - return string16(); +base::string16 ContentClient::GetLocalizedString(int message_id) const { + return base::string16(); } base::StringPiece ContentClient::GetDataResource( diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h index e2e0c73..1695656 100644 --- a/content/public/common/content_client.h +++ b/content/public/common/content_client.h @@ -118,7 +118,7 @@ class CONTENT_EXPORT ContentClient { virtual std::string GetUserAgent() const; // Returns a string resource given its id. - virtual string16 GetLocalizedString(int message_id) const; + virtual base::string16 GetLocalizedString(int message_id) const; // Return the contents of a resource in a StringPiece given the resource id. virtual base::StringPiece GetDataResource( diff --git a/content/public/common/context_menu_params.h b/content/public/common/context_menu_params.h index 49bd74f..fe91439 100644 --- a/content/public/common/context_menu_params.h +++ b/content/public/common/context_menu_params.h @@ -62,7 +62,7 @@ struct CONTENT_EXPORT ContextMenuParams { // The text associated with the link. May be an empty string if the contents // of the link are an image. // Will be empty if link_url is empty. - string16 link_text; + base::string16 link_text; // The link URL to be used ONLY for "copy link address". We don't validate // this field in the frontend process. @@ -99,11 +99,11 @@ struct CONTENT_EXPORT ContextMenuParams { int media_flags; // This is the text of the selection that the context menu was invoked on. - string16 selection_text; + base::string16 selection_text; // The misspelled word under the cursor, if any. Used to generate the // |dictionary_suggestions| list. - string16 misspelled_word; + base::string16 misspelled_word; // The identifier of the misspelling under the cursor, if any. uint32 misspelling_hash; @@ -113,7 +113,7 @@ struct CONTENT_EXPORT ContextMenuParams { // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter // and populating dictionary_suggestions if the type is EDITABLE // and the misspelled_word is not empty. - std::vector<string16> dictionary_suggestions; + std::vector<base::string16> dictionary_suggestions; // If editable, flag for whether node is speech-input enabled. bool speech_input_enabled; diff --git a/content/public/common/file_chooser_params.h b/content/public/common/file_chooser_params.h index 0c7f1e4..4604326 100644 --- a/content/public/common/file_chooser_params.h +++ b/content/public/common/file_chooser_params.h @@ -37,14 +37,14 @@ struct CONTENT_EXPORT FileChooserParams { // Title to be used for the dialog. This may be empty for the default title, // which will be either "Open" or "Save" depending on the mode. - string16 title; + base::string16 title; // Default file name to select in the dialog. base::FilePath default_file_name; // A list of valid lower-cased MIME types or file extensions specified in an // input element. It is used to restrict selectable files to such types. - std::vector<string16> accept_types; + std::vector<base::string16> accept_types; #if defined(OS_ANDROID) // See http://www.w3.org/TR/html-media-capture for more information. diff --git a/content/public/common/show_desktop_notification_params.h b/content/public/common/show_desktop_notification_params.h index d31f947..5ff4511 100644 --- a/content/public/common/show_desktop_notification_params.h +++ b/content/public/common/show_desktop_notification_params.h @@ -21,15 +21,15 @@ struct CONTENT_EXPORT ShowDesktopNotificationHostMsgParams { // Contents of the notification if is_html is false. GURL icon_url; - string16 title; - string16 body; + base::string16 title; + base::string16 body; // Directionality of the notification. blink::WebTextDirection direction; // ReplaceID if this notification should replace an existing one; may be // empty if no replacement is called for. - string16 replace_id; + base::string16 replace_id; // Notification ID for sending events back for this notification. int notification_id; diff --git a/content/public/common/speech_recognition_result.h b/content/public/common/speech_recognition_result.h index 78044e5..aa1a02c 100644 --- a/content/public/common/speech_recognition_result.h +++ b/content/public/common/speech_recognition_result.h @@ -14,12 +14,12 @@ namespace content { struct SpeechRecognitionHypothesis { - string16 utterance; + base::string16 utterance; double confidence; SpeechRecognitionHypothesis() : confidence(0.0) {} - SpeechRecognitionHypothesis(const string16& utterance_value, + SpeechRecognitionHypothesis(const base::string16& utterance_value, double confidence_value) : utterance(utterance_value), confidence(confidence_value) { diff --git a/content/public/plugin/content_plugin_client.h b/content/public/plugin/content_plugin_client.h index cff2ad5..f68c3ad 100644 --- a/content/public/plugin/content_plugin_client.h +++ b/content/public/plugin/content_plugin_client.h @@ -20,7 +20,7 @@ class CONTENT_EXPORT ContentPluginClient { virtual void PreSandboxInitialization() {} // Notifies that a plugin process has started. - virtual void PluginProcessStarted(const string16& plugin_name) {} + virtual void PluginProcessStarted(const base::string16& plugin_name) {} }; } // namespace content diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index a3a6e5b..4757a669 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -119,7 +119,7 @@ class CONTENT_EXPORT ContentRendererClient { const blink::WebURLError& error, const std::string& accept_languages, std::string* error_html, - string16* error_description) {} + base::string16* error_description) {} // Allows the embedder to control when media resources are loaded. Embedders // can run |closure| immediately if they don't wish to defer media resource diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index 01857c7..b2e3045 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -95,8 +95,8 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { const blink::WebPluginParams& params) = 0; // Evaluates a string of JavaScript in a particular frame. - virtual void EvaluateScript(const string16& frame_xpath, - const string16& jscript, + virtual void EvaluateScript(const base::string16& frame_xpath, + const base::string16& jscript, int id, bool notify_result) = 0; diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 3894421..5a87327 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc @@ -539,21 +539,21 @@ bool SetCookie(BrowserContext* browser_context, } TitleWatcher::TitleWatcher(WebContents* web_contents, - const string16& expected_title) + const base::string16& expected_title) : WebContentsObserver(web_contents), message_loop_runner_(new MessageLoopRunner) { EXPECT_TRUE(web_contents != NULL); expected_titles_.push_back(expected_title); } -void TitleWatcher::AlsoWaitForTitle(const string16& expected_title) { +void TitleWatcher::AlsoWaitForTitle(const base::string16& expected_title) { expected_titles_.push_back(expected_title); } TitleWatcher::~TitleWatcher() { } -const string16& TitleWatcher::WaitAndGetTitle() { +const base::string16& TitleWatcher::WaitAndGetTitle() { message_loop_runner_->Run(); return observed_title_; } @@ -571,7 +571,7 @@ void TitleWatcher::TitleWasSet(NavigationEntry* entry, bool explicit_set) { } void TitleWatcher::TestTitle() { - std::vector<string16>::const_iterator it = + std::vector<base::string16>::const_iterator it = std::find(expected_titles_.begin(), expected_titles_.end(), web_contents()->GetTitle()); diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h index 53b40ec..510e809 100644 --- a/content/public/test/browser_test_utils.h +++ b/content/public/test/browser_test_utils.h @@ -196,16 +196,16 @@ class TitleWatcher : public WebContentsObserver { // entire lifetime of |this|. |expected_title| is the title that |this| // will wait for. TitleWatcher(WebContents* web_contents, - const string16& expected_title); + const base::string16& expected_title); virtual ~TitleWatcher(); // Adds another title to watch for. - void AlsoWaitForTitle(const string16& expected_title); + void AlsoWaitForTitle(const base::string16& expected_title); // Waits until the title matches either expected_title or one of the titles // added with AlsoWaitForTitle. Returns the value of the most recently // observed matching title. - const string16& WaitAndGetTitle() WARN_UNUSED_RESULT; + const base::string16& WaitAndGetTitle() WARN_UNUSED_RESULT; private: // Overridden WebContentsObserver methods. @@ -214,11 +214,11 @@ class TitleWatcher : public WebContentsObserver { void TestTitle(); - std::vector<string16> expected_titles_; + std::vector<base::string16> expected_titles_; scoped_refptr<MessageLoopRunner> message_loop_runner_; // The most recently observed expected title, if any. - string16 observed_title_; + base::string16 observed_title_; DISALLOW_COPY_AND_ASSIGN(TitleWatcher); }; diff --git a/content/public/test/fake_speech_recognition_manager.cc b/content/public/test/fake_speech_recognition_manager.cc index 065fcb5..3d7b582 100644 --- a/content/public/test/fake_speech_recognition_manager.cc +++ b/content/public/test/fake_speech_recognition_manager.cc @@ -115,8 +115,8 @@ void FakeSpeechRecognitionManager::AbortAllSessionsForRenderView( bool FakeSpeechRecognitionManager::HasAudioInputDevices() { return true; } -string16 FakeSpeechRecognitionManager::GetAudioInputDeviceModel() { - return string16(); +base::string16 FakeSpeechRecognitionManager::GetAudioInputDeviceModel() { + return base::string16(); } int FakeSpeechRecognitionManager::GetSession(int render_process_id, diff --git a/content/public/test/fake_speech_recognition_manager.h b/content/public/test/fake_speech_recognition_manager.h index 0973f6c..c76340a 100644 --- a/content/public/test/fake_speech_recognition_manager.h +++ b/content/public/test/fake_speech_recognition_manager.h @@ -52,7 +52,7 @@ class FakeSpeechRecognitionManager : public SpeechRecognitionManager { virtual void AbortAllSessionsForRenderView(int render_process_id, int render_view_id) OVERRIDE; virtual bool HasAudioInputDevices() OVERRIDE; - virtual string16 GetAudioInputDeviceModel() OVERRIDE; + virtual base::string16 GetAudioInputDeviceModel() OVERRIDE; virtual void ShowAudioInputSettings() OVERRIDE {} virtual int GetSession(int render_process_id, int render_view_id, diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc index 21bcaf2..9ef67e3 100644 --- a/content/public/test/mock_render_process_host.cc +++ b/content/public/test/mock_render_process_host.cc @@ -111,7 +111,7 @@ StoragePartition* MockRenderProcessHost::GetStoragePartition() const { return NULL; } -void MockRenderProcessHost::AddWord(const string16& word) { +void MockRenderProcessHost::AddWord(const base::string16& word) { } bool MockRenderProcessHost::FastShutdownIfPossible() { diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h index 3836ff5..daf9c81 100644 --- a/content/public/test/mock_render_process_host.h +++ b/content/public/test/mock_render_process_host.h @@ -50,7 +50,7 @@ class MockRenderProcessHost : public RenderProcessHost { virtual int VisibleWidgetCount() const OVERRIDE; virtual bool IsGuest() const OVERRIDE; virtual StoragePartition* GetStoragePartition() const OVERRIDE; - virtual void AddWord(const string16& word); + virtual void AddWord(const base::string16& word); virtual bool FastShutdownIfPossible() OVERRIDE; virtual bool FastShutdownStarted() const OVERRIDE; virtual void DumpHandles() OVERRIDE; diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc index 4862675..9da66ac 100644 --- a/content/public/test/mock_render_thread.cc +++ b/content/public/test/mock_render_thread.cc @@ -26,7 +26,7 @@ MockRenderThread::~MockRenderThread() { } void MockRenderThread::VerifyRunJavaScriptMessageSend( - const string16& expected_alert_message) { + const base::string16& expected_alert_message) { const IPC::Message* alert_msg = sink_.GetUniqueMessageMatching(ViewHostMsg_RunJavaScriptMessage::ID); ASSERT_TRUE(alert_msg); diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h index ec03c78..dc5b82a 100644 --- a/content/public/test/mock_render_thread.h +++ b/content/public/test/mock_render_thread.h @@ -35,7 +35,8 @@ class MockRenderThread : public RenderThread { // Helpers for embedders to know when content IPC messages are received, since // they don't have access to content IPC files. - void VerifyRunJavaScriptMessageSend(const string16& expected_alert_message); + void VerifyRunJavaScriptMessageSend( + const base::string16& expected_alert_message); // RenderThread implementation: virtual bool Send(IPC::Message* msg) OVERRIDE; diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc index 2d96a85..64a4d2c 100644 --- a/content/public/test/render_view_test.cc +++ b/content/public/test/render_view_test.cc @@ -91,7 +91,7 @@ void RenderViewTest::ExecuteJavaScript(const char* js) { } bool RenderViewTest::ExecuteJavaScriptAndReturnIntValue( - const string16& script, + const base::string16& script, int* int_result) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> result = @@ -173,7 +173,7 @@ void RenderViewTest::SetUp() { kMainFrameRouteId, kSurfaceId, kInvalidSessionStorageNamespaceId, - string16(), + base::string16(), false, // is_renderer_created false, // swapped_out false, // hidden diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h index 6a5c2a1..204d023 100644 --- a/content/public/test/render_view_test.h +++ b/content/public/test/render_view_test.h @@ -66,7 +66,8 @@ class RenderViewTest : public testing::Test { // |result|. // Returns true if the JavaScript was evaluated correctly to an int value, // false otherwise. - bool ExecuteJavaScriptAndReturnIntValue(const string16& script, int* result); + bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, + int* result); // Loads the given HTML into the main frame as a data: URL and blocks until // the navigation is committed. diff --git a/content/public/test/test_renderer_host.h b/content/public/test/test_renderer_host.h index 69cfa8f..5eb5777 100644 --- a/content/public/test/test_renderer_host.h +++ b/content/public/test/test_renderer_host.h @@ -69,7 +69,7 @@ class RenderViewHostTester { virtual ~RenderViewHostTester() {} // Gives tests access to RenderViewHostImpl::CreateRenderView. - virtual bool CreateRenderView(const string16& frame_name, + virtual bool CreateRenderView(const base::string16& frame_name, int opener_route_id, int32 max_page_id) = 0; diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc index 989437c..c417483 100644 --- a/content/public/test/test_utils.cc +++ b/content/public/test/test_utils.cc @@ -137,7 +137,7 @@ scoped_ptr<base::Value> ExecuteScriptAndGetValue( ScriptCallback observer; render_view_host->ExecuteJavascriptInWebFrameCallbackResult( - string16(), // frame_xpath, + base::string16(), // frame_xpath, UTF8ToUTF16(script), base::Bind(&ScriptCallback::ResultCallback, base::Unretained(&observer))); base::MessageLoop* loop = base::MessageLoop::current(); diff --git a/content/renderer/android/address_detector.cc b/content/renderer/android/address_detector.cc index afc7ab6..fdc70b1 100644 --- a/content/renderer/android/address_detector.cc +++ b/content/renderer/android/address_detector.cc @@ -36,20 +36,23 @@ size_t AddressDetector::GetMaximumContentLength() { return kMaxAddressLength; } -std::string AddressDetector::GetContentText(const string16& text) { +std::string AddressDetector::GetContentText(const base::string16& text) { // Get the address and replace unicode bullets with commas. - string16 address_16 = CollapseWhitespace(text, false); + base::string16 address_16 = CollapseWhitespace(text, false); std::replace(address_16.begin(), address_16.end(), static_cast<char16>(0x2022), static_cast<char16>(',')); return UTF16ToUTF8(address_16); } -bool AddressDetector::FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, size_t* start_pos, size_t* end_pos, +bool AddressDetector::FindContent( + const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, + size_t* start_pos, + size_t* end_pos, std::string* content_text) { if (address_parser::FindAddress(begin, end, start_pos, end_pos)) { content_text->assign( - GetContentText(string16(begin + *start_pos, begin + *end_pos))); + GetContentText(base::string16(begin + *start_pos, begin + *end_pos))); return true; } return false; diff --git a/content/renderer/android/address_detector.h b/content/renderer/android/address_detector.h index 2619503..eea777f 100644 --- a/content/renderer/android/address_detector.h +++ b/content/renderer/android/address_detector.h @@ -19,15 +19,15 @@ class AddressDetector : public ContentDetector { private: // Implementation of ContentDetector. - virtual bool FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, + virtual bool FindContent(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos, std::string* content_text) OVERRIDE; virtual GURL GetIntentURL(const std::string& content_text) OVERRIDE; virtual size_t GetMaximumContentLength() OVERRIDE; - std::string GetContentText(const string16& text); + std::string GetContentText(const base::string16& text); DISALLOW_COPY_AND_ASSIGN(AddressDetector); }; diff --git a/content/renderer/android/content_detector.cc b/content/renderer/android/content_detector.cc index 66af041..e5d2f05 100644 --- a/content/renderer/android/content_detector.cc +++ b/content/renderer/android/content_detector.cc @@ -52,7 +52,7 @@ WebRange ContentDetector::FindContentRange( if (surrounding_text.isNull()) return WebRange(); - string16 content = surrounding_text.textContent(); + base::string16 content = surrounding_text.textContent(); if (content.empty()) return WebRange(); diff --git a/content/renderer/android/content_detector.h b/content/renderer/android/content_detector.h index 85ee668..28a153a 100644 --- a/content/renderer/android/content_detector.h +++ b/content/renderer/android/content_detector.h @@ -44,8 +44,8 @@ class ContentDetector { // if the desired content is found. The start and end positions relative to // the input iterators are returned in start_pos and end_pos. // The end position is assumed to be non-inclusive. - virtual bool FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, + virtual bool FindContent(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos, std::string* content_text) = 0; diff --git a/content/renderer/android/email_detector.cc b/content/renderer/android/email_detector.cc index 28b8af4..dba1f42 100644 --- a/content/renderer/android/email_detector.cc +++ b/content/renderer/android/email_detector.cc @@ -42,12 +42,12 @@ GURL EmailDetector::GetIntentURL(const std::string& content_text) { net::EscapeQueryParamValue(content_text, true)); } -bool EmailDetector::FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, +bool EmailDetector::FindContent(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos, std::string* content_text) { - string16 utf16_input = string16(begin, end); + base::string16 utf16_input = base::string16(begin, end); icu::UnicodeString pattern(kEmailRegex); icu::UnicodeString input(utf16_input.data(), utf16_input.length()); UErrorCode status = U_ZERO_ERROR; diff --git a/content/renderer/android/email_detector.h b/content/renderer/android/email_detector.h index dbd6de3..ff469e8 100644 --- a/content/renderer/android/email_detector.h +++ b/content/renderer/android/email_detector.h @@ -23,8 +23,8 @@ class CONTENT_EXPORT EmailDetector : public ContentDetector { friend class EmailDetectorTest; // Implementation of ContentDetector. - virtual bool FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, + virtual bool FindContent(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos, std::string* content_text) OVERRIDE; diff --git a/content/renderer/android/email_detector_unittest.cc b/content/renderer/android/email_detector_unittest.cc index f3ed10f..45bcc9b 100644 --- a/content/renderer/android/email_detector_unittest.cc +++ b/content/renderer/android/email_detector_unittest.cc @@ -13,8 +13,8 @@ class EmailDetectorTest : public testing::Test { public: static void FindAndCheckEmail(const std::string& content, const std::string& expected) { - string16 content_16 = UTF8ToUTF16(content); - string16 result_16; + base::string16 content_16 = UTF8ToUTF16(content); + base::string16 result_16; size_t start, end; EmailDetector detector; std::string content_text; diff --git a/content/renderer/android/phone_number_detector.cc b/content/renderer/android/phone_number_detector.cc index 19c526f..843adfa 100644 --- a/content/renderer/android/phone_number_detector.cc +++ b/content/renderer/android/phone_number_detector.cc @@ -54,12 +54,13 @@ GURL PhoneNumberDetector::GetIntentURL(const std::string& content_text) { net::EscapeQueryParamValue(content_text, true)); } -bool PhoneNumberDetector::FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, - size_t* start_pos, - size_t* end_pos, - std::string* content_text) { - string16 utf16_input = string16(begin, end); +bool PhoneNumberDetector::FindContent( + const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, + size_t* start_pos, + size_t* end_pos, + std::string* content_text) { + base::string16 utf16_input = base::string16(begin, end); std::string utf8_input = UTF16ToUTF8(utf16_input); PhoneNumberMatcher matcher(utf8_input, region_code_); diff --git a/content/renderer/android/phone_number_detector.h b/content/renderer/android/phone_number_detector.h index 1ccf47d..081a427 100644 --- a/content/renderer/android/phone_number_detector.h +++ b/content/renderer/android/phone_number_detector.h @@ -24,8 +24,8 @@ class CONTENT_EXPORT PhoneNumberDetector : public ContentDetector { friend class PhoneNumberDetectorTest; // Implementation of ContentDetector. - virtual bool FindContent(const string16::const_iterator& begin, - const string16::const_iterator& end, + virtual bool FindContent(const base::string16::const_iterator& begin, + const base::string16::const_iterator& end, size_t* start_pos, size_t* end_pos, std::string* content_text) OVERRIDE; diff --git a/content/renderer/android/phone_number_detector_unittest.cc b/content/renderer/android/phone_number_detector_unittest.cc index 387cede..e248f0e 100644 --- a/content/renderer/android/phone_number_detector_unittest.cc +++ b/content/renderer/android/phone_number_detector_unittest.cc @@ -13,8 +13,8 @@ class PhoneNumberDetectorTest : public testing::Test { public: static std::string FindNumber(const std::string& content, const std::string& region) { - string16 content_16 = UTF8ToUTF16(content); - string16 result_16; + base::string16 content_16 = UTF8ToUTF16(content); + base::string16 result_16; size_t start, end; PhoneNumberDetector detector(region); std::string content_text; @@ -26,8 +26,8 @@ class PhoneNumberDetectorTest : public testing::Test { static std::string FindAndFormatNumber(const std::string& content, const std::string& region) { - string16 content_16 = UTF8ToUTF16(content); - string16 result_16; + base::string16 content_16 = UTF8ToUTF16(content); + base::string16 result_16; size_t start, end; PhoneNumberDetector detector(region); std::string content_text; diff --git a/content/renderer/cpp_bound_class_unittest.cc b/content/renderer/cpp_bound_class_unittest.cc index 0aeab77..8b05fea 100644 --- a/content/renderer/cpp_bound_class_unittest.cc +++ b/content/renderer/cpp_bound_class_unittest.cc @@ -104,7 +104,7 @@ class CppBoundClassTest : public RenderViewTest { void CheckTrue(const std::string& expression) { int was_page_a = -1; - string16 check_page_a = + base::string16 check_page_a = ASCIIToUTF16(std::string("Number(") + expression + ")"); EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_a, &was_page_a)); EXPECT_EQ(1, was_page_a); diff --git a/content/renderer/dom_storage/dom_storage_dispatcher.cc b/content/renderer/dom_storage/dom_storage_dispatcher.cc index 936f217..477251c 100644 --- a/content/renderer/dom_storage/dom_storage_dispatcher.cc +++ b/content/renderer/dom_storage/dom_storage_dispatcher.cc @@ -111,12 +111,12 @@ class DomStorageDispatcher::ProxyImpl : public DOMStorageProxy { virtual void LoadArea(int connection_id, DOMStorageValuesMap* values, bool* send_log_get_messages, const CompletionCallback& callback) OVERRIDE; - virtual void SetItem(int connection_id, const string16& key, - const string16& value, const GURL& page_url, + virtual void SetItem(int connection_id, const base::string16& key, + const base::string16& value, const GURL& page_url, const CompletionCallback& callback) OVERRIDE; - virtual void LogGetItem(int connection_id, const string16& key, + virtual void LogGetItem(int connection_id, const base::string16& key, const base::NullableString16& value) OVERRIDE; - virtual void RemoveItem(int connection_id, const string16& key, + virtual void RemoveItem(int connection_id, const base::string16& key, const GURL& page_url, const CompletionCallback& callback) OVERRIDE; virtual void ClearArea(int connection_id, @@ -244,8 +244,8 @@ void DomStorageDispatcher::ProxyImpl::LoadArea( } void DomStorageDispatcher::ProxyImpl::SetItem( - int connection_id, const string16& key, - const string16& value, const GURL& page_url, + int connection_id, const base::string16& key, + const base::string16& value, const GURL& page_url, const CompletionCallback& callback) { PushPendingCallback(callback); throttling_filter_->SendThrottled(new DOMStorageHostMsg_SetItem( @@ -253,13 +253,13 @@ void DomStorageDispatcher::ProxyImpl::SetItem( } void DomStorageDispatcher::ProxyImpl::LogGetItem( - int connection_id, const string16& key, + int connection_id, const base::string16& key, const base::NullableString16& value) { sender_->Send(new DOMStorageHostMsg_LogGetItem(connection_id, key, value)); } void DomStorageDispatcher::ProxyImpl::RemoveItem( - int connection_id, const string16& key, const GURL& page_url, + int connection_id, const base::string16& key, const GURL& page_url, const CompletionCallback& callback) { PushPendingCallback(callback); throttling_filter_->SendThrottled(new DOMStorageHostMsg_RemoveItem( diff --git a/content/renderer/external_popup_menu_browsertest.cc b/content/renderer/external_popup_menu_browsertest.cc index fd6041d..2e3e664 100644 --- a/content/renderer/external_popup_menu_browsertest.cc +++ b/content/renderer/external_popup_menu_browsertest.cc @@ -57,7 +57,7 @@ class ExternalPopupMenuTest : public RenderViewTest { } int GetSelectedIndex() { - string16 script(ASCIIToUTF16(kSelectID)); + base::string16 script(ASCIIToUTF16(kSelectID)); script.append(ASCIIToUTF16(".selectedIndex")); int selected_index = -1; ExecuteJavaScriptAndReturnIntValue(script, &selected_index); diff --git a/content/renderer/geolocation_dispatcher.cc b/content/renderer/geolocation_dispatcher.cc index 031376c..a764b61 100644 --- a/content/renderer/geolocation_dispatcher.cc +++ b/content/renderer/geolocation_dispatcher.cc @@ -87,7 +87,7 @@ bool GeolocationDispatcher::lastPosition(WebGeolocationPosition&) { void GeolocationDispatcher::requestPermission( const WebGeolocationPermissionRequest& permissionRequest) { int bridge_id = pending_permissions_->add(permissionRequest); - string16 origin = permissionRequest.securityOrigin().toString(); + base::string16 origin = permissionRequest.securityOrigin().toString(); Send(new GeolocationHostMsg_RequestPermission( routing_id(), bridge_id, GURL(origin))); } @@ -99,7 +99,7 @@ void GeolocationDispatcher::cancelPermissionRequest( int bridge_id; if (!pending_permissions_->remove(permissionRequest, bridge_id)) return; - string16 origin = permissionRequest.securityOrigin().toString(); + base::string16 origin = permissionRequest.securityOrigin().toString(); Send(new GeolocationHostMsg_CancelPermissionRequest( routing_id(), bridge_id, GURL(origin))); } diff --git a/content/renderer/gpu/input_event_filter_unittest.cc b/content/renderer/gpu/input_event_filter_unittest.cc index 93a0707..8630d15 100644 --- a/content/renderer/gpu/input_event_filter_unittest.cc +++ b/content/renderer/gpu/input_event_filter_unittest.cc @@ -285,9 +285,9 @@ TEST_F(InputEventFilterTest, PreserveRelativeOrder) { messages.push_back(InputMsg_Paste(kTestRoutingID)); messages.push_back(InputMsg_PasteAndMatchStyle(kTestRoutingID)); messages.push_back(InputMsg_Delete(kTestRoutingID)); - messages.push_back(InputMsg_Replace(kTestRoutingID, string16())); + messages.push_back(InputMsg_Replace(kTestRoutingID, base::string16())); messages.push_back(InputMsg_ReplaceMisspelling(kTestRoutingID, - string16())); + base::string16())); messages.push_back(InputMsg_Delete(kTestRoutingID)); messages.push_back(InputMsg_SelectAll(kTestRoutingID)); messages.push_back(InputMsg_Unselect(kTestRoutingID)); diff --git a/content/renderer/java/java_bridge_dispatcher.cc b/content/renderer/java/java_bridge_dispatcher.cc index 633295a..f7e435c 100644 --- a/content/renderer/java/java_bridge_dispatcher.cc +++ b/content/renderer/java/java_bridge_dispatcher.cc @@ -65,7 +65,7 @@ void JavaBridgeDispatcher::DidClearWindowObject(blink::WebFrame* web_frame) { } void JavaBridgeDispatcher::OnAddNamedObject( - const string16& name, + const base::string16& name, const NPVariant_Param& variant_param) { DCHECK_EQ(variant_param.type, NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID); @@ -95,7 +95,7 @@ void JavaBridgeDispatcher::OnAddNamedObject( objects_[name] = variant; } -void JavaBridgeDispatcher::OnRemoveNamedObject(const string16& name) { +void JavaBridgeDispatcher::OnRemoveNamedObject(const base::string16& name) { if (!channel_.get()) { DCHECK(objects_.empty()); return; diff --git a/content/renderer/java/java_bridge_dispatcher.h b/content/renderer/java/java_bridge_dispatcher.h index a50eb38..325d529 100644 --- a/content/renderer/java/java_bridge_dispatcher.h +++ b/content/renderer/java/java_bridge_dispatcher.h @@ -33,15 +33,15 @@ class JavaBridgeDispatcher : public RenderViewObserver { virtual void DidClearWindowObject(blink::WebFrame* frame) OVERRIDE; // Message handlers - void OnAddNamedObject(const string16& name, + void OnAddNamedObject(const base::string16& name, const NPVariant_Param& variant_param); - void OnRemoveNamedObject(const string16& name); + void OnRemoveNamedObject(const base::string16& name); void EnsureChannelIsSetUp(); // Objects that will be bound to the window when the window object is next // cleared. We hold a ref to these. - typedef std::map<string16, NPVariant> ObjectMap; + typedef std::map<base::string16, NPVariant> ObjectMap; ObjectMap objects_; scoped_refptr<JavaBridgeChannel> channel_; }; diff --git a/content/renderer/media/midi_dispatcher.cc b/content/renderer/media/midi_dispatcher.cc index e5dccf3..1f04e3e 100644 --- a/content/renderer/media/midi_dispatcher.cc +++ b/content/renderer/media/midi_dispatcher.cc @@ -48,7 +48,7 @@ void MIDIDispatcher::cancelSysExPermissionRequest( it.Advance()) { WebMIDIPermissionRequest* value = it.GetCurrentValue(); if (value->equals(request)) { - string16 origin = request.securityOrigin().toString(); + base::string16 origin = request.securityOrigin().toString(); Send(new MIDIHostMsg_CancelSysExPermissionRequest( routing_id(), it.GetCurrentKey(), GURL(origin))); requests_.Remove(it.GetCurrentKey()); diff --git a/content/renderer/media/rtc_data_channel_handler.cc b/content/renderer/media/rtc_data_channel_handler.cc index 3cd9a37..065048a 100644 --- a/content/renderer/media/rtc_data_channel_handler.cc +++ b/content/renderer/media/rtc_data_channel_handler.cc @@ -120,7 +120,7 @@ void RtcDataChannelHandler::OnMessage(const webrtc::DataBuffer& buffer) { if (buffer.binary) { webkit_client_->didReceiveRawData(buffer.data.data(), buffer.data.length()); } else { - string16 utf16; + base::string16 utf16; if (!UTF8ToUTF16(buffer.data.data(), buffer.data.length(), &utf16)) { LOG(ERROR) << "Failed convert received data to UTF16"; return; diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.cc b/content/renderer/media/webcontentdecryptionmodule_impl.cc index 2c363ce..d320124 100644 --- a/content/renderer/media/webcontentdecryptionmodule_impl.cc +++ b/content/renderer/media/webcontentdecryptionmodule_impl.cc @@ -149,7 +149,7 @@ WebContentDecryptionModuleSessionImpl* ReferenceIdAdapter::GetSession( //------------------------------------------------------------------------------ WebContentDecryptionModuleImpl* -WebContentDecryptionModuleImpl::Create(const string16& key_system) { +WebContentDecryptionModuleImpl::Create(const base::string16& key_system) { // TODO(ddorwin): Guard against this in supported types check and remove this. // Chromium only supports ASCII key systems. if (!IsStringASCII(key_system)) { diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h index a457bca..27c79c0 100644 --- a/content/renderer/media/webcontentdecryptionmodule_impl.h +++ b/content/renderer/media/webcontentdecryptionmodule_impl.h @@ -23,7 +23,8 @@ class ReferenceIdAdapter; class WebContentDecryptionModuleImpl : public blink::WebContentDecryptionModule { public: - static WebContentDecryptionModuleImpl* Create(const string16& key_system); + static WebContentDecryptionModuleImpl* Create( + const base::string16& key_system); virtual ~WebContentDecryptionModuleImpl(); diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc index 108e292..62c4e749 100644 --- a/content/renderer/npapi/webplugin_delegate_proxy.cc +++ b/content/renderer/npapi/webplugin_delegate_proxy.cc @@ -749,7 +749,7 @@ NPP WebPluginDelegateProxy::GetPluginNPP() { return npp_.get(); } -bool WebPluginDelegateProxy::GetFormValue(string16* value) { +bool WebPluginDelegateProxy::GetFormValue(base::string16* value) { bool success = false; Send(new PluginMsg_GetFormValue(instance_id_, value, &success)); return success; @@ -800,7 +800,7 @@ void WebPluginDelegateProxy::SetContentAreaFocus(bool has_focus) { #if defined(OS_WIN) void WebPluginDelegateProxy::ImeCompositionUpdated( - const string16& text, + const base::string16& text, const std::vector<int>& clauses, const std::vector<int>& target, int cursor_position, @@ -815,7 +815,7 @@ void WebPluginDelegateProxy::ImeCompositionUpdated( Send(msg); } -void WebPluginDelegateProxy::ImeCompositionCompleted(const string16& text, +void WebPluginDelegateProxy::ImeCompositionCompleted(const base::string16& text, int plugin_id) { // Dispatch the IME text if this plug-in is the focused one. if (instance_id_ != plugin_id) @@ -864,7 +864,7 @@ void WebPluginDelegateProxy::WindowFrameChanged(gfx::Rect window_frame, msg->set_unblock(true); Send(msg); } -void WebPluginDelegateProxy::ImeCompositionCompleted(const string16& text, +void WebPluginDelegateProxy::ImeCompositionCompleted(const base::string16& text, int plugin_id) { // If the message isn't intended for this plugin, there's nothing to do. if (instance_id_ != plugin_id) @@ -1209,7 +1209,8 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { // Need to update geometry synchronously with WMP, otherwise if a site // scripts the plugin to start playing while it's in the middle of handling // an update geometry message, videos don't play. See urls in bug 20260. - if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) + if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != + base::string16::npos) return true; // The move networks plugin needs to be informed of geometry updates diff --git a/content/renderer/npapi/webplugin_delegate_proxy.h b/content/renderer/npapi/webplugin_delegate_proxy.h index 679bc6d..04c4684 100644 --- a/content/renderer/npapi/webplugin_delegate_proxy.h +++ b/content/renderer/npapi/webplugin_delegate_proxy.h @@ -64,7 +64,7 @@ class WebPluginDelegateProxy virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) OVERRIDE; virtual NPObject* GetPluginScriptableObject() OVERRIDE; virtual struct _NPP* GetPluginNPP() OVERRIDE; - virtual bool GetFormValue(string16* value) OVERRIDE; + virtual bool GetFormValue(base::string16* value) OVERRIDE; virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, int notify_id) OVERRIDE; virtual void SetFocus(bool focused) OVERRIDE; @@ -78,14 +78,15 @@ class WebPluginDelegateProxy #if defined(OS_WIN) // Informs the plugin that plugin IME has updated its status. virtual void ImeCompositionUpdated( - const string16& text, + const base::string16& text, const std::vector<int>& clauses, const std::vector<int>& target, int cursor_position, int plugin_id); // Informs the plugin that plugin IME has completed. // If |text| is empty, composition was cancelled. - virtual void ImeCompositionCompleted(const string16& text, int plugin_id); + virtual void ImeCompositionCompleted(const base::string16& text, + int plugin_id); #endif #if defined(OS_MACOSX) // Informs the plugin that its enclosing window has gained or lost focus. @@ -96,7 +97,8 @@ class WebPluginDelegateProxy virtual void WindowFrameChanged(gfx::Rect window_frame, gfx::Rect view_frame); // Informs the plugin that plugin IME has completed. // If |text| is empty, composition was cancelled. - virtual void ImeCompositionCompleted(const string16& text, int plugin_id); + virtual void ImeCompositionCompleted(const base::string16& text, + int plugin_id); #endif // IPC::Listener implementation: diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 7e1dcaf..d187ba2 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -335,7 +335,7 @@ void RenderFrameImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) { } void RenderFrameImpl::SimulateImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { @@ -344,14 +344,14 @@ void RenderFrameImpl::SimulateImeSetComposition( } void RenderFrameImpl::SimulateImeConfirmComposition( - const string16& text, + const base::string16& text, const gfx::Range& replacement_range) { render_view_->OnImeConfirmComposition(text, replacement_range, false); } void RenderFrameImpl::OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { @@ -366,10 +366,10 @@ void RenderFrameImpl::OnImeSetComposition( // Empty -> nonempty: composition started. if (pepper_composition_text_.empty() && !text.empty()) - focused_pepper_plugin_->HandleCompositionStart(string16()); + focused_pepper_plugin_->HandleCompositionStart(base::string16()); // Nonempty -> empty: composition canceled. if (!pepper_composition_text_.empty() && text.empty()) - focused_pepper_plugin_->HandleCompositionEnd(string16()); + focused_pepper_plugin_->HandleCompositionEnd(base::string16()); pepper_composition_text_ = text; // Nonempty: composition is ongoing. if (!pepper_composition_text_.empty()) { @@ -381,14 +381,15 @@ void RenderFrameImpl::OnImeSetComposition( } void RenderFrameImpl::OnImeConfirmComposition( - const string16& text, + const base::string16& text, const gfx::Range& replacement_range, bool keep_selection) { // When a PPAPI plugin has focus, we bypass WebKit. // Here, text.empty() has a special meaning. It means to commit the last // update of composition text (see // RenderWidgetHost::ImeConfirmComposition()). - const string16& last_text = text.empty() ? pepper_composition_text_ : text; + const base::string16& last_text = text.empty() ? pepper_composition_text_ + : text; // last_text is empty only when both text and pepper_composition_text_ is. // Ignore it. diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index e7a0321..bc16c75 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -126,22 +126,22 @@ class CONTENT_EXPORT RenderFrameImpl // Simulates IME events for testing purpose. void SimulateImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); - void SimulateImeConfirmComposition(const string16& text, + void SimulateImeConfirmComposition(const base::string16& text, const gfx::Range& replacement_range); // TODO(jam): remove these once the IPC handler moves from RenderView to // RenderFrame. void OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); void OnImeConfirmComposition( - const string16& text, + const base::string16& text, const gfx::Range& replacement_range, bool keep_selection); @@ -325,7 +325,7 @@ class CONTENT_EXPORT RenderFrameImpl // Current text input composition text. Empty if no composition is in // progress. - string16 pepper_composition_text_; + base::string16 pepper_composition_text_; // The plugin instance that received the last mouse event. It is set to NULL // if the last mouse event went to elements other than Pepper plugins. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 3f7ec1e..ab1545f 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -1000,7 +1000,7 @@ media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() { #if defined(OS_WIN) void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, - const string16& str) { + const base::string16& str) { Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str)); } diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 1f16ee7..391911d 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -282,7 +282,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, media::AudioHardwareConfig* GetAudioHardwareConfig(); #if defined(OS_WIN) - void PreCacheFontCharacters(const LOGFONT& log_font, const string16& str); + void PreCacheFontCharacters(const LOGFONT& log_font, + const base::string16& str); #endif #if defined(ENABLE_WEBRTC) diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index a95d20b..92d8fcc 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc @@ -144,7 +144,7 @@ class RenderViewImplTest : public RenderViewTest { int SendKeyEvent(MockKeyboard::Layout layout, int key_code, MockKeyboard::Modifiers modifiers, - string16* output) { + base::string16* output) { #if defined(OS_WIN) // Retrieve the Unicode character for the given tuple (keyboard-layout, // key-code, and modifiers). @@ -1052,7 +1052,7 @@ TEST_F(RenderViewImplTest, ImeComposition) { case IME_CANCELCOMPOSITION: view()->OnImeSetComposition( - string16(), + base::string16(), std::vector<blink::WebCompositionUnderline>(), 0, 0); break; @@ -1240,7 +1240,7 @@ TEST_F(RenderViewImplTest, MAYBE_OnHandleKeyboardEvent) { // driver is installed in a PC and the driver can assign a Unicode // charcter for the given tuple (key-code and modifiers). int key_code = kKeyCodes[k]; - string16 char_code; + base::string16 char_code; if (SendKeyEvent(layout, key_code, modifiers, &char_code) < 0) continue; @@ -1487,7 +1487,7 @@ TEST_F(RenderViewImplTest, MAYBE_InsertCharacters) { // driver is installed in a PC and the driver can assign a Unicode // charcter for the given tuple (layout, key-code, and modifiers). int key_code = kKeyCodes[k]; - string16 char_code; + base::string16 char_code; if (SendKeyEvent(layout, key_code, modifiers, &char_code) < 0) continue; } @@ -1745,7 +1745,7 @@ TEST_F(RenderViewImplTest, TestBackForward) { LoadHTML("<div id=pagename>Page A</div>"); blink::WebHistoryItem page_a_item = GetMainFrame()->currentHistoryItem(); int was_page_a = -1; - string16 check_page_a = + base::string16 check_page_a = ASCIIToUTF16( "Number(document.getElementById('pagename').innerHTML == 'Page A')"); EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_a, &was_page_a)); @@ -1753,7 +1753,7 @@ TEST_F(RenderViewImplTest, TestBackForward) { LoadHTML("<div id=pagename>Page B</div>"); int was_page_b = -1; - string16 check_page_b = + base::string16 check_page_b = ASCIIToUTF16( "Number(document.getElementById('pagename').innerHTML == 'Page B')"); EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_b, &was_page_b)); @@ -1761,7 +1761,7 @@ TEST_F(RenderViewImplTest, TestBackForward) { LoadHTML("<div id=pagename>Page C</div>"); int was_page_c = -1; - string16 check_page_c = + base::string16 check_page_c = ASCIIToUTF16( "Number(document.getElementById('pagename').innerHTML == 'Page C')"); EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_c, &was_page_c)); @@ -1802,14 +1802,14 @@ TEST_F(RenderViewImplTest, GetCompositionCharacterBoundsTest) { LoadHTML("<textarea id=\"test\"></textarea>"); ExecuteJavaScript("document.getElementById('test').focus();"); - const string16 empty_string = UTF8ToUTF16(""); + const base::string16 empty_string = UTF8ToUTF16(""); const std::vector<blink::WebCompositionUnderline> empty_underline; std::vector<gfx::Rect> bounds; view()->OnSetFocus(true); view()->OnSetInputMethodActive(true); // ASCII composition - const string16 ascii_composition = UTF8ToUTF16("aiueo"); + const base::string16 ascii_composition = UTF8ToUTF16("aiueo"); view()->OnImeSetComposition(ascii_composition, empty_underline, 0, 0); view()->GetCompositionCharacterBounds(&bounds); ASSERT_EQ(ascii_composition.size(), bounds.size()); @@ -1819,7 +1819,7 @@ TEST_F(RenderViewImplTest, GetCompositionCharacterBoundsTest) { empty_string, gfx::Range::InvalidRange(), false); // Non surrogate pair unicode character. - const string16 unicode_composition = UTF8ToUTF16( + const base::string16 unicode_composition = UTF8ToUTF16( "\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86\xE3\x81\x88\xE3\x81\x8A"); view()->OnImeSetComposition(unicode_composition, empty_underline, 0, 0); view()->GetCompositionCharacterBounds(&bounds); @@ -1830,7 +1830,7 @@ TEST_F(RenderViewImplTest, GetCompositionCharacterBoundsTest) { empty_string, gfx::Range::InvalidRange(), false); // Surrogate pair character. - const string16 surrogate_pair_char = UTF8ToUTF16("\xF0\xA0\xAE\x9F"); + const base::string16 surrogate_pair_char = UTF8ToUTF16("\xF0\xA0\xAE\x9F"); view()->OnImeSetComposition(surrogate_pair_char, empty_underline, 0, @@ -1843,7 +1843,7 @@ TEST_F(RenderViewImplTest, GetCompositionCharacterBoundsTest) { empty_string, gfx::Range::InvalidRange(), false); // Mixed string. - const string16 surrogate_pair_mixed_composition = + const base::string16 surrogate_pair_mixed_composition = surrogate_pair_char + UTF8ToUTF16("\xE3\x81\x82") + surrogate_pair_char + UTF8ToUTF16("b") + surrogate_pair_char; const size_t utf16_length = 8UL; @@ -2045,7 +2045,7 @@ class SuppressErrorPageTest : public RenderViewTest { const blink::WebURLError& error, const std::string& accept_languages, std::string* error_html, - string16* error_description) OVERRIDE { + base::string16* error_description) OVERRIDE { if (error_html) *error_html = "A suffusion of yellow."; } diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm index dd1354f..f0959e0 100644 --- a/content/renderer/render_view_browsertest_mac.mm +++ b/content/renderer/render_view_browsertest_mac.mm @@ -86,7 +86,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) { view->OnUpdateWebPreferences(prefs); const int kMaxOutputCharacters = 1024; - string16 output; + base::string16 output; NSEvent* arrowDownKeyDown = CmdDeadKeyEvent(NSKeyDown, kVK_DownArrow); NSEvent* arrowUpKeyDown = CmdDeadKeyEvent(NSKeyDown, kVK_UpArrow); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 9f9c7e8..42c0347 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1103,7 +1103,7 @@ RenderViewImpl* RenderViewImpl::Create( int32 main_frame_routing_id, int32 surface_id, int64 session_storage_namespace_id, - const string16& frame_name, + const base::string16& frame_name, bool is_renderer_created, bool swapped_out, bool hidden, @@ -1697,7 +1697,7 @@ void RenderViewImpl::OnRedo() { GetFocusedNode()); } -void RenderViewImpl::OnReplace(const string16& text) { +void RenderViewImpl::OnReplace(const base::string16& text) { if (!webview()) return; @@ -1708,7 +1708,7 @@ void RenderViewImpl::OnReplace(const string16& text) { frame->replaceSelection(text); } -void RenderViewImpl::OnReplaceMisspelling(const string16& text) { +void RenderViewImpl::OnReplaceMisspelling(const base::string16& text) { if (!webview()) return; @@ -1781,7 +1781,7 @@ void RenderViewImpl::OnCopyToFindPboard() { // than the |OnCopy()| case. WebFrame* frame = webview()->focusedFrame(); if (frame->hasSelection()) { - string16 selection = frame->selectionAsText(); + base::string16 selection = frame->selectionAsText(); RenderThread::Get()->Send( new ClipboardHostMsg_FindPboardWriteStringAsync(selection)); } @@ -1991,7 +1991,7 @@ void RenderViewImpl::UpdateURL(WebFrame* frame) { params.referrer = GetReferrerFromRequest(frame, original_request); } - string16 method = request.httpMethod(); + base::string16 method = request.httpMethod(); if (EqualsASCII(method, "POST")) { params.is_post = true; params.post_id = ExtractPostId(item); @@ -2048,7 +2048,7 @@ void RenderViewImpl::UpdateURL(WebFrame* frame) { // Tell the embedding application that the title of the active page has changed void RenderViewImpl::UpdateTitle(WebFrame* frame, - const string16& title, + const base::string16& title, WebTextDirection title_direction) { // Ignore all but top level navigations. if (frame->parent()) @@ -2057,7 +2057,7 @@ void RenderViewImpl::UpdateTitle(WebFrame* frame, base::debug::TraceLog::GetInstance()->UpdateProcessLabel( routing_id_, UTF16ToUTF8(title)); - string16 shortened_title = title.substr(0, kMaxTitleChars); + base::string16 shortened_title = title.substr(0, kMaxTitleChars); Send(new ViewHostMsg_UpdateTitle(routing_id_, page_id_, shortened_title, title_direction)); } @@ -2169,17 +2169,17 @@ void RenderViewImpl::LoadNavigationErrorPage( } bool RenderViewImpl::RunJavaScriptMessage(JavaScriptMessageType type, - const string16& message, - const string16& default_value, + const base::string16& message, + const base::string16& default_value, const GURL& frame_url, - string16* result) { + base::string16* result) { // Don't allow further dialogs if we are waiting to swap out, since the // PageGroupLoadDeferrer in our stack prevents it. if (suppress_dialogs_until_swap_out_) return false; bool success = false; - string16 result_temp; + base::string16 result_temp; if (!result) result = &result_temp; @@ -2310,7 +2310,7 @@ WebView* RenderViewImpl::createView( main_frame_routing_id, surface_id, cloned_session_storage_namespace_id, - string16(), // WebCore will take care of setting the correct name. + base::string16(), // WebCore will take care of setting the correct name. true, // is_renderer_created false, // swapped_out params.disposition == NEW_BACKGROUND_TAB, // hidden @@ -2582,7 +2582,7 @@ void RenderViewImpl::runModalAlertDialog(WebFrame* frame, const WebString& message) { RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_ALERT, message, - string16(), + base::string16(), frame->document().url(), NULL); } @@ -2591,7 +2591,7 @@ bool RenderViewImpl::runModalConfirmDialog(WebFrame* frame, const WebString& message) { return RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_CONFIRM, message, - string16(), + base::string16(), frame->document().url(), NULL); } @@ -2600,7 +2600,7 @@ bool RenderViewImpl::runModalPromptDialog(WebFrame* frame, const WebString& message, const WebString& default_value, WebString* actual_value) { - string16 result; + base::string16 result; bool ok = RunJavaScriptMessage(JAVASCRIPT_MESSAGE_TYPE_PROMPT, message, default_value, @@ -2636,7 +2636,7 @@ bool RenderViewImpl::runModalBeforeUnloadDialog( bool success = false; // This is an ignored return value, but is included so we can accept the same // response as RunJavaScriptMessage. - string16 ignored_result; + base::string16 ignored_result; SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm( routing_id_, frame->document().url(), message, is_reload, &success, &ignored_result)); @@ -3806,7 +3806,7 @@ void RenderViewImpl::didFailLoad(WebFrame* frame, const WebURLError& error) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidFailLoad(frame, error)); const WebURLRequest& failed_request = ds->request(); - string16 error_description; + base::string16 error_description; GetContentClient()->renderer()->GetNavigationErrorStrings( frame, failed_request, @@ -4108,11 +4108,11 @@ void RenderViewImpl::SendFindReply(int request_id, // static bool RenderViewImpl::ShouldUpdateSelectionTextFromContextMenuParams( - const string16& selection_text, + const base::string16& selection_text, size_t selection_text_offset, const gfx::Range& selection_range, const ContextMenuParams& params) { - string16 trimmed_selection_text; + base::string16 trimmed_selection_text; if (!selection_text.empty() && !selection_range.is_empty()) { const int start = selection_range.GetMin() - selection_text_offset; const size_t length = selection_range.length(); @@ -4121,7 +4121,7 @@ bool RenderViewImpl::ShouldUpdateSelectionTextFromContextMenuParams( &trimmed_selection_text); } } - string16 trimmed_params_text; + base::string16 trimmed_params_text; TrimWhitespace(params.selection_text, TRIM_ALL, &trimmed_params_text); return trimmed_params_text != trimmed_selection_text; } @@ -4329,8 +4329,8 @@ blink::WebPlugin* RenderViewImpl::CreatePlugin( #endif } -void RenderViewImpl::EvaluateScript(const string16& frame_xpath, - const string16& jscript, +void RenderViewImpl::EvaluateScript(const base::string16& frame_xpath, + const base::string16& jscript, int id, bool notify_result) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); @@ -4444,7 +4444,7 @@ void RenderViewImpl::SyncSelectionIfRequired() { if (!frame) return; - string16 text; + base::string16 text; size_t offset; gfx::Range range; #if defined(ENABLE_PLUGINS) @@ -4572,7 +4572,7 @@ blink::WebPlugin* RenderViewImpl::GetWebPluginFromPluginDocument() { } void RenderViewImpl::OnFind(int request_id, - const string16& search_text, + const base::string16& search_text, const WebFindOptions& options) { WebFrame* main_frame = webview()->mainFrame(); @@ -4858,7 +4858,7 @@ void RenderViewImpl::OnResetPageEncodingToDefault() { webview()->setPageEncoding(no_encoding); } -WebFrame* RenderViewImpl::GetChildFrame(const string16& xpath) const { +WebFrame* RenderViewImpl::GetChildFrame(const base::string16& xpath) const { if (xpath.empty()) return webview()->mainFrame(); @@ -4867,11 +4867,11 @@ WebFrame* RenderViewImpl::GetChildFrame(const string16& xpath) const { // Example, /html/body/table/tbody/tr/td/iframe\n/frameset/frame[0] // should break into 2 xpaths // /html/body/table/tbody/tr/td/iframe & /frameset/frame[0] - std::vector<string16> xpaths; + std::vector<base::string16> xpaths; base::SplitString(xpath, '\n', &xpaths); WebFrame* frame = webview()->mainFrame(); - for (std::vector<string16>::const_iterator i = xpaths.begin(); + for (std::vector<base::string16>::const_iterator i = xpaths.begin(); frame && i != xpaths.end(); ++i) { frame = frame->findChildByExpression(*i); } @@ -4879,8 +4879,8 @@ WebFrame* RenderViewImpl::GetChildFrame(const string16& xpath) const { return frame; } -void RenderViewImpl::OnScriptEvalRequest(const string16& frame_xpath, - const string16& jscript, +void RenderViewImpl::OnScriptEvalRequest(const base::string16& frame_xpath, + const base::string16& jscript, int id, bool notify_result) { TRACE_EVENT_INSTANT0("test_tracing", "OnScriptEvalRequest", @@ -4933,7 +4933,7 @@ void RenderViewImpl::OnPostMessageEvent( frame->dispatchMessageEventWithOriginCheck(target_origin, msg_event); } -void RenderViewImpl::OnCSSInsertRequest(const string16& frame_xpath, +void RenderViewImpl::OnCSSInsertRequest(const base::string16& frame_xpath, const std::string& css) { WebFrame* frame = GetChildFrame(frame_xpath); if (!frame) @@ -5552,7 +5552,7 @@ void RenderViewImpl::OnWindowFrameChanged(const gfx::Rect& window_frame, #endif } -void RenderViewImpl::OnPluginImeCompositionCompleted(const string16& text, +void RenderViewImpl::OnPluginImeCompositionCompleted(const base::string16& text, int plugin_id) { // WebPluginDelegateProxy is responsible for figuring out if this event // applies to it or not, so inform all the delegates. @@ -5709,7 +5709,7 @@ void RenderViewImpl::OnSetFocus(bool enable) { } void RenderViewImpl::OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { @@ -5753,7 +5753,7 @@ void RenderViewImpl::OnImeSetComposition( } void RenderViewImpl::OnImeConfirmComposition( - const string16& text, + const base::string16& text, const gfx::Range& replacement_range, bool keep_selection) { #if defined(ENABLE_PLUGINS) diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index f3c7cf0..6a7ce2f 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -190,7 +190,7 @@ class CONTENT_EXPORT RenderViewImpl int32 main_frame_routing_id, int32 surface_id, int64 session_storage_namespace_id, - const string16& frame_name, + const base::string16& frame_name, bool is_renderer_created, bool swapped_out, bool hidden, @@ -629,8 +629,8 @@ class CONTENT_EXPORT RenderViewImpl blink::WebFrame* frame, const WebPluginInfo& info, const blink::WebPluginParams& params) OVERRIDE; - virtual void EvaluateScript(const string16& frame_xpath, - const string16& jscript, + virtual void EvaluateScript(const base::string16& frame_xpath, + const base::string16& jscript, int id, bool notify_result) OVERRIDE; virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; @@ -705,11 +705,11 @@ class CONTENT_EXPORT RenderViewImpl virtual GURL GetURLForGraphicsContext3D() OVERRIDE; virtual bool ForceCompositingModeEnabled() OVERRIDE; virtual void OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) OVERRIDE; - virtual void OnImeConfirmComposition(const string16& text, + virtual void OnImeConfirmComposition(const base::string16& text, const gfx::Range& replacement_range, bool keep_selection) OVERRIDE; virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; @@ -819,7 +819,7 @@ class CONTENT_EXPORT RenderViewImpl const blink::WebURLResponse& response); void UpdateURL(blink::WebFrame* frame); - void UpdateTitle(blink::WebFrame* frame, const string16& title, + void UpdateTitle(blink::WebFrame* frame, const base::string16& title, blink::WebTextDirection title_direction); void UpdateSessionHistory(blink::WebFrame* frame); void SendUpdateState(const blink::WebHistoryItem& item); @@ -846,10 +846,10 @@ class CONTENT_EXPORT RenderViewImpl blink::WebNavigationPolicy policy); bool RunJavaScriptMessage(JavaScriptMessageType type, - const string16& message, - const string16& default_value, + const base::string16& message, + const base::string16& default_value, const GURL& frame_url, - string16* result); + base::string16* result); // Sends a message and runs a nested message loop. bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); @@ -870,8 +870,8 @@ class CONTENT_EXPORT RenderViewImpl void OnPaste(); void OnPasteAndMatchStyle(); void OnRedo(); - void OnReplace(const string16& text); - void OnReplaceMisspelling(const string16& text); + void OnReplace(const base::string16& text); + void OnReplaceMisspelling(const base::string16& text); void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); void OnSelectAll(); void OnSelectRange(const gfx::Point& start, const gfx::Point& end); @@ -886,7 +886,7 @@ class CONTENT_EXPORT RenderViewImpl void OnContextMenuClosed(const CustomContextMenuContext& custom_context); void OnShowContextMenu(const gfx::Point& location); void OnCopyImageAt(int x, int y); - void OnCSSInsertRequest(const string16& frame_xpath, + void OnCSSInsertRequest(const base::string16& frame_xpath, const std::string& css); void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, unsigned action); @@ -920,7 +920,9 @@ class CONTENT_EXPORT RenderViewImpl void OnExtendSelectionAndDelete(int before, int after); void OnFileChooserResponse( const std::vector<ui::SelectedFileInfo>& files); - void OnFind(int request_id, const string16&, const blink::WebFindOptions&); + void OnFind(int request_id, + const base::string16&, + const blink::WebFindOptions&); void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( const std::vector<GURL>& links, @@ -937,8 +939,8 @@ class CONTENT_EXPORT RenderViewImpl void OnReleaseDisambiguationPopupDIB(TransportDIB::Handle dib_handle); void OnReloadFrame(); void OnResetPageEncodingToDefault(); - void OnScriptEvalRequest(const string16& frame_xpath, - const string16& jscript, + void OnScriptEvalRequest(const base::string16& frame_xpath, + const base::string16& jscript, int id, bool notify_result); void OnSetAccessibilityMode(AccessibilityMode new_mode); @@ -985,7 +987,8 @@ class CONTENT_EXPORT RenderViewImpl #elif defined(OS_MACOSX) void OnCopyToFindPboard(); - void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); + void OnPluginImeCompositionCompleted(const base::string16& text, + int plugin_id); void OnSelectPopupMenuItem(int selected_index); void OnSetInLiveResize(bool in_live_resize); void OnSetWindowVisibility(bool visible); @@ -1031,7 +1034,7 @@ class CONTENT_EXPORT RenderViewImpl ErrorPageType error_type); // Locates a sub frame with given xpath - blink::WebFrame* GetChildFrame(const string16& frame_xpath) const; + blink::WebFrame* GetChildFrame(const base::string16& frame_xpath) const; // Returns the URL being loaded by the given frame's request. GURL GetLoadingUrl(blink::WebFrame* frame) const; @@ -1089,7 +1092,7 @@ class CONTENT_EXPORT RenderViewImpl // Returns whether |params.selection_text| should be synchronized to the // browser before bringing up the context menu. Static for testing. static bool ShouldUpdateSelectionTextFromContextMenuParams( - const string16& selection_text, + const base::string16& selection_text, size_t selection_text_offset, const gfx::Range& selection_range, const ContextMenuParams& params); @@ -1289,7 +1292,7 @@ class CONTENT_EXPORT RenderViewImpl // portion of this string that is the actual selected text starts at index // |selection_range_.GetMin() - selection_text_offset_| and has length // |selection_range_.length()|. - string16 selection_text_; + base::string16 selection_text_; // The offset corresponding to the start of |selection_text_| in the document. size_t selection_text_offset_; // Range over the document corresponding to the actual selected text (which diff --git a/content/renderer/render_view_impl_params.cc b/content/renderer/render_view_impl_params.cc index 253ef7f..0e77ea4 100644 --- a/content/renderer/render_view_impl_params.cc +++ b/content/renderer/render_view_impl_params.cc @@ -14,7 +14,7 @@ RenderViewImplParams::RenderViewImplParams( int32 main_frame_routing_id, int32 surface_id, int64 session_storage_namespace_id, - const string16& frame_name, + const base::string16& frame_name, bool is_renderer_created, bool swapped_out, bool hidden, diff --git a/content/renderer/render_view_impl_params.h b/content/renderer/render_view_impl_params.h index 3aec433..5993f30 100644 --- a/content/renderer/render_view_impl_params.h +++ b/content/renderer/render_view_impl_params.h @@ -30,7 +30,7 @@ struct CONTENT_EXPORT RenderViewImplParams { int32 main_frame_routing_id, int32 surface_id, int64 session_storage_namespace_id, - const string16& frame_name, + const base::string16& frame_name, bool is_renderer_created, bool swapped_out, bool hidden, @@ -47,7 +47,7 @@ struct CONTENT_EXPORT RenderViewImplParams { int32 main_frame_routing_id; int32 surface_id; int64 session_storage_namespace_id; - const string16& frame_name; + const base::string16& frame_name; bool is_renderer_created; bool swapped_out; bool hidden; diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 544e4c9..17512f2 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -2105,7 +2105,7 @@ void RenderWidget::OnCandidateWindowHidden() { } void RenderWidget::OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<WebCompositionUnderline>& underlines, int selection_start, int selection_end) { if (!ShouldHandleImeEvent()) @@ -2124,7 +2124,7 @@ void RenderWidget::OnImeSetComposition( #endif } -void RenderWidget::OnImeConfirmComposition(const string16& text, +void RenderWidget::OnImeConfirmComposition(const base::string16& text, const gfx::Range& replacement_range, bool keep_selection) { if (!ShouldHandleImeEvent()) diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 6129104..a9abafd 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -351,11 +351,11 @@ class CONTENT_EXPORT RenderWidget void OnCandidateWindowUpdated(); void OnCandidateWindowHidden(); virtual void OnImeSetComposition( - const string16& text, + const base::string16& text, const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); - virtual void OnImeConfirmComposition(const string16& text, + virtual void OnImeConfirmComposition(const base::string16& text, const gfx::Range& replacement_range, bool keep_selection); void OnPaintAtSize(const TransportDIB::Handle& dib_id, diff --git a/content/renderer/renderer_clipboard_client.cc b/content/renderer/renderer_clipboard_client.cc index acbc6cd..9c47463 100644 --- a/content/renderer/renderer_clipboard_client.cc +++ b/content/renderer/renderer_clipboard_client.cc @@ -120,15 +120,16 @@ void RendererClipboardClient::Clear(ui::ClipboardType type) { RenderThreadImpl::current()->Send(new ClipboardHostMsg_Clear(type)); } -void RendererClipboardClient::ReadAvailableTypes(ui::ClipboardType type, - std::vector<string16>* types, - bool* contains_filenames) { +void RendererClipboardClient::ReadAvailableTypes( + ui::ClipboardType type, + std::vector<base::string16>* types, + bool* contains_filenames) { RenderThreadImpl::current()->Send(new ClipboardHostMsg_ReadAvailableTypes( type, types, contains_filenames)); } void RendererClipboardClient::ReadText(ui::ClipboardType type, - string16* result) { + base::string16* result) { RenderThreadImpl::current()->Send( new ClipboardHostMsg_ReadText(type, result)); } @@ -140,7 +141,7 @@ void RendererClipboardClient::ReadAsciiText(ui::ClipboardType type, } void RendererClipboardClient::ReadHTML(ui::ClipboardType type, - string16* markup, + base::string16* markup, GURL* url, uint32* fragment_start, uint32* fragment_end) { RenderThreadImpl::current()->Send(new ClipboardHostMsg_ReadHTML( @@ -166,8 +167,8 @@ void RendererClipboardClient::ReadImage(ui::ClipboardType type, } void RendererClipboardClient::ReadCustomData(ui::ClipboardType clipboard_type, - const string16& type, - string16* data) { + const base::string16& type, + base::string16* data) { RenderThreadImpl::current()->Send( new ClipboardHostMsg_ReadCustomData(clipboard_type, type, data)); } diff --git a/content/renderer/renderer_clipboard_client.h b/content/renderer/renderer_clipboard_client.h index 1635a2b..96d05b2 100644 --- a/content/renderer/renderer_clipboard_client.h +++ b/content/renderer/renderer_clipboard_client.h @@ -22,22 +22,22 @@ class RendererClipboardClient : public ClipboardClient { ui::ClipboardType type) OVERRIDE; virtual void Clear(ui::ClipboardType type) OVERRIDE; virtual void ReadAvailableTypes(ui::ClipboardType type, - std::vector<string16>* types, + std::vector<base::string16>* types, bool* contains_filenames) OVERRIDE; virtual void ReadText(ui::ClipboardType type, - string16* result) OVERRIDE; + base::string16* result) OVERRIDE; virtual void ReadAsciiText(ui::ClipboardType type, std::string* result) OVERRIDE; virtual void ReadHTML(ui::ClipboardType type, - string16* markup, + base::string16* markup, GURL* url, uint32* fragment_start, uint32* fragment_end) OVERRIDE; virtual void ReadRTF(ui::ClipboardType type, std::string* result) OVERRIDE; virtual void ReadImage(ui::ClipboardType type, std::string* data) OVERRIDE; virtual void ReadCustomData(ui::ClipboardType clipboard_type, - const string16& type, - string16* data) OVERRIDE; + const base::string16& type, + base::string16* data) OVERRIDE; virtual void ReadData(const ui::Clipboard::FormatType& format, std::string* data) OVERRIDE; virtual WriteContext* CreateWriteContext() OVERRIDE; diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc index c4b4616..e425c5a 100644 --- a/content/renderer/renderer_main_platform_delegate_win.cc +++ b/content/renderer/renderer_main_platform_delegate_win.cc @@ -38,8 +38,9 @@ void SkiaPreCacheFontCharacters(const LOGFONT& logfont, unsigned int text_length) { RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); if (render_thread_impl) { - render_thread_impl->PreCacheFontCharacters(logfont, - string16(text, text_length)); + render_thread_impl->PreCacheFontCharacters( + logfont, + base::string16(text, text_length)); } } diff --git a/content/renderer/websharedworker_proxy.cc b/content/renderer/websharedworker_proxy.cc index ad35f02..9b5edc5 100644 --- a/content/renderer/websharedworker_proxy.cc +++ b/content/renderer/websharedworker_proxy.cc @@ -51,10 +51,10 @@ void WebSharedWorkerProxy::Disconnect() { void WebSharedWorkerProxy::CreateWorkerContext( const GURL& script_url, bool is_shared, - const string16& name, - const string16& user_agent, - const string16& source_code, - const string16& content_security_policy, + const base::string16& name, + const base::string16& user_agent, + const base::string16& source_code, + const base::string16& content_security_policy, blink::WebContentSecurityPolicyType policy_type, int pending_route_id, int64 script_resource_appcache_id) { diff --git a/content/renderer/websharedworker_proxy.h b/content/renderer/websharedworker_proxy.h index 92f1a20..2df018a 100644 --- a/content/renderer/websharedworker_proxy.h +++ b/content/renderer/websharedworker_proxy.h @@ -73,10 +73,10 @@ class WebSharedWorkerProxy : public blink::WebSharedWorker, void CreateWorkerContext(const GURL& script_url, bool is_shared, - const string16& name, - const string16& user_agent, - const string16& source_code, - const string16& content_security_policy, + const base::string16& name, + const base::string16& user_agent, + const base::string16& source_code, + const base::string16& content_security_policy, blink::WebContentSecurityPolicyType policy_type, int pending_route_id, int64 script_resource_appcache_id); diff --git a/content/shell/app/shell_breakpad_client.cc b/content/shell/app/shell_breakpad_client.cc index c4dd86d..8e8a7d0 100644 --- a/content/shell/app/shell_breakpad_client.cc +++ b/content/shell/app/shell_breakpad_client.cc @@ -28,8 +28,8 @@ void ShellBreakpadClient::GetProductNameAndVersion( base::string16* channel_name) { *product_name = ASCIIToUTF16("content_shell"); *version = ASCIIToUTF16(CONTENT_SHELL_VERSION); - *special_build = string16(); - *channel_name = string16(); + *special_build = base::string16(); + *channel_name = base::string16(); } #endif diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc index f9e63e1..41b592f 100644 --- a/content/shell/browser/shell.cc +++ b/content/shell/browser/shell.cc @@ -323,9 +323,9 @@ JavaScriptDialogManager* Shell::GetJavaScriptDialogManager() { bool Shell::AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) { + const base::string16& source_id) { return CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree); } diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h index 20515f6..1434b76 100644 --- a/content/shell/browser/shell.h +++ b/content/shell/browser/shell.h @@ -142,9 +142,9 @@ class Shell : public WebContentsDelegate, #endif virtual bool AddMessageToConsole(WebContents* source, int32 level, - const string16& message, + const base::string16& message, int32 line_no, - const string16& source_id) OVERRIDE; + const base::string16& source_id) OVERRIDE; virtual void RendererUnresponsive(WebContents* source) OVERRIDE; virtual void ActivateContents(WebContents* contents) OVERRIDE; virtual void DeactivateContents(WebContents* contents) OVERRIDE; @@ -191,7 +191,7 @@ class Shell : public WebContentsDelegate, // Sets whether the spinner is spinning. void PlatformSetIsLoading(bool loading); // Set the title of shell window - void PlatformSetTitle(const string16& title); + void PlatformSetTitle(const base::string16& title); #if defined(OS_ANDROID) void PlatformToggleFullscreenModeForTab(WebContents* web_contents, bool enter_fullscreen); diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc index 5cea4c1..b11ba37 100644 --- a/content/shell/browser/shell_android.cc +++ b/content/shell/browser/shell_android.cc @@ -60,7 +60,7 @@ void Shell::PlatformResizeSubViews() { // Not needed; subviews are bound. } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { NOTIMPLEMENTED(); } diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc index 6d66963..ccaffb7 100644 --- a/content/shell/browser/shell_aura.cc +++ b/content/shell/browser/shell_aura.cc @@ -198,7 +198,7 @@ void Shell::Close() { web_contents_.reset(); } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { } } // namespace content diff --git a/content/shell/browser/shell_gtk.cc b/content/shell/browser/shell_gtk.cc index 66d17ce7..3d2580a 100644 --- a/content/shell/browser/shell_gtk.cc +++ b/content/shell/browser/shell_gtk.cc @@ -335,7 +335,7 @@ gboolean Shell::OnReloadKeyPressed(GtkAccelGroup* accel_group, return TRUE; } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { if (headless_) return; diff --git a/content/shell/browser/shell_javascript_dialog.h b/content/shell/browser/shell_javascript_dialog.h index 4001334..233296b 100644 --- a/content/shell/browser/shell_javascript_dialog.h +++ b/content/shell/browser/shell_javascript_dialog.h @@ -29,8 +29,8 @@ class ShellJavaScriptDialog { ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback); ~ShellJavaScriptDialog(); @@ -46,8 +46,8 @@ class ShellJavaScriptDialog { #elif defined(OS_WIN) JavaScriptMessageType message_type_; HWND dialog_win_; - string16 message_text_; - string16 default_prompt_text_; + base::string16 message_text_; + base::string16 default_prompt_text_; static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(TOOLKIT_GTK) diff --git a/content/shell/browser/shell_javascript_dialog_gtk.cc b/content/shell/browser/shell_javascript_dialog_gtk.cc index 87bd6f3..65bf739 100644 --- a/content/shell/browser/shell_javascript_dialog_gtk.cc +++ b/content/shell/browser/shell_javascript_dialog_gtk.cc @@ -19,12 +19,12 @@ const char kPromptTextId[] = "content_shell_prompt_text"; // If there's a text entry in the dialog, get the text from the first one and // return it. -string16 GetPromptText(GtkDialog* dialog) { +base::string16 GetPromptText(GtkDialog* dialog) { GtkWidget* widget = static_cast<GtkWidget*>( g_object_get_data(G_OBJECT(dialog), kPromptTextId)); if (widget) return UTF8ToUTF16(gtk_entry_get_text(GTK_ENTRY(widget))); - return string16(); + return base::string16(); } } // namespace @@ -36,8 +36,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback), @@ -113,7 +113,7 @@ void ShellJavaScriptDialog::OnResponse(GtkWidget* dialog, int response_id) { break; case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: - callback_.Run(false, string16()); + callback_.Run(false, base::string16()); break; default: NOTREACHED(); diff --git a/content/shell/browser/shell_javascript_dialog_mac.mm b/content/shell/browser/shell_javascript_dialog_mac.mm index fe9de98..e748000 100644 --- a/content/shell/browser/shell_javascript_dialog_mac.mm +++ b/content/shell/browser/shell_javascript_dialog_mac.mm @@ -66,7 +66,7 @@ return; bool success = returnCode == NSAlertFirstButtonReturn; - string16 input; + base::string16 input; if (textField_) input = base::SysNSStringToUTF16([textField_ stringValue]); @@ -89,8 +89,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback) { diff --git a/content/shell/browser/shell_javascript_dialog_manager.cc b/content/shell/browser/shell_javascript_dialog_manager.cc index 1476f7c..6ac7243b 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.cc +++ b/content/shell/browser/shell_javascript_dialog_manager.cc @@ -27,18 +27,18 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } if (!dialog_request_callback_.is_null()) { dialog_request_callback_.Run(); - callback.Run(true, string16()); + callback.Run(true, base::string16()); dialog_request_callback_.Reset(); return; } @@ -52,7 +52,7 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( return; } - string16 new_message_text = net::FormatUrl(origin_url, accept_lang) + + base::string16 new_message_text = net::FormatUrl(origin_url, accept_lang) + ASCIIToUTF16("\n\n") + message_text; gfx::NativeWindow parent_window = @@ -73,17 +73,17 @@ void ShellJavaScriptDialogManager::RunJavaScriptDialog( void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } if (!dialog_request_callback_.is_null()) { dialog_request_callback_.Run(); - callback.Run(true, string16()); + callback.Run(true, base::string16()); dialog_request_callback_.Reset(); return; } @@ -91,11 +91,11 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) if (dialog_) { // Seriously!? - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; } - string16 new_message_text = + base::string16 new_message_text = message_text + ASCIIToUTF16("\n\nIs it OK to leave/reload this page?"); @@ -106,11 +106,11 @@ void ShellJavaScriptDialogManager::RunBeforeUnloadDialog( parent_window, JAVASCRIPT_MESSAGE_TYPE_CONFIRM, new_message_text, - string16(), // default_prompt_text + base::string16(), // default callback)); #else // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if - callback.Run(true, string16()); + callback.Run(true, base::string16()); return; #endif } diff --git a/content/shell/browser/shell_javascript_dialog_manager.h b/content/shell/browser/shell_javascript_dialog_manager.h index 763736f..5bcfb65 100644 --- a/content/shell/browser/shell_javascript_dialog_manager.h +++ b/content/shell/browser/shell_javascript_dialog_manager.h @@ -25,14 +25,14 @@ class ShellJavaScriptDialogManager : public JavaScriptDialogManager { const GURL& origin_url, const std::string& accept_lang, JavaScriptMessageType javascript_message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const DialogClosedCallback& callback, bool* did_suppress_message) OVERRIDE; virtual void RunBeforeUnloadDialog( WebContents* web_contents, - const string16& message_text, + const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) OVERRIDE; diff --git a/content/shell/browser/shell_javascript_dialog_win.cc b/content/shell/browser/shell_javascript_dialog_win.cc index a59639e..3537122 100644 --- a/content/shell/browser/shell_javascript_dialog_win.cc +++ b/content/shell/browser/shell_javascript_dialog_win.cc @@ -34,7 +34,7 @@ INT_PTR CALLBACK ShellJavaScriptDialog::DialogProc(HWND dialog, GetWindowLongPtr(dialog, DWLP_USER)); if (owner->dialog_win_) { owner->dialog_win_ = 0; - owner->callback_.Run(false, string16()); + owner->callback_.Run(false, base::string16()); owner->manager_->DialogClosed(owner); } break; @@ -42,7 +42,7 @@ INT_PTR CALLBACK ShellJavaScriptDialog::DialogProc(HWND dialog, case WM_COMMAND: { ShellJavaScriptDialog* owner = reinterpret_cast<ShellJavaScriptDialog*>( GetWindowLongPtr(dialog, DWLP_USER)); - string16 user_input; + base::string16 user_input; bool finish = false; bool result; switch (LOWORD(wparam)) { @@ -79,8 +79,8 @@ ShellJavaScriptDialog::ShellJavaScriptDialog( ShellJavaScriptDialogManager* manager, gfx::NativeWindow parent_window, JavaScriptMessageType message_type, - const string16& message_text, - const string16& default_prompt_text, + const base::string16& message_text, + const base::string16& default_prompt_text, const JavaScriptDialogManager::DialogClosedCallback& callback) : manager_(manager), callback_(callback), diff --git a/content/shell/browser/shell_login_dialog.cc b/content/shell/browser/shell_login_dialog.cc index 607fd66..b01fe98 100644 --- a/content/shell/browser/shell_login_dialog.cc +++ b/content/shell/browser/shell_login_dialog.cc @@ -34,8 +34,8 @@ void ShellLoginDialog::OnRequestCancelled() { base::Bind(&ShellLoginDialog::PlatformRequestCancelled, this)); } -void ShellLoginDialog::UserAcceptedAuth(const string16& username, - const string16& password) { +void ShellLoginDialog::UserAcceptedAuth(const base::string16& username, + const base::string16& password) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -48,7 +48,7 @@ void ShellLoginDialog::UserCancelledAuth() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ShellLoginDialog::SendAuthToRequester, this, - false, string16(), string16())); + false, base::string16(), base::string16())); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&ShellLoginDialog::PlatformCleanUp, this)); @@ -63,20 +63,20 @@ ShellLoginDialog::~ShellLoginDialog() { // Bogus implementations for linking. They are never called because // ResourceDispatcherHostDelegate::CreateLoginDelegate returns NULL. // TODO: implement ShellLoginDialog for other platforms, drop this #if -void ShellLoginDialog::PlatformCreateDialog(const string16& message) {} +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) {} void ShellLoginDialog::PlatformCleanUp() {} void ShellLoginDialog::PlatformRequestCancelled() {} #endif -void ShellLoginDialog::PrepDialog(const string16& host, - const string16& realm) { +void ShellLoginDialog::PrepDialog(const base::string16& host, + const base::string16& realm) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // The realm is controlled by the remote server, so there is no reason to // believe it is of a reasonable length. - string16 elided_realm; + base::string16 elided_realm; gfx::ElideString(realm, 120, &elided_realm); - string16 explanation = + base::string16 explanation = ASCIIToUTF16("The server ") + host + ASCIIToUTF16(" requires a username and password."); @@ -90,8 +90,8 @@ void ShellLoginDialog::PrepDialog(const string16& host, } void ShellLoginDialog::SendAuthToRequester(bool success, - const string16& username, - const string16& password) { + const base::string16& username, + const base::string16& password) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (success) request_->SetAuth(net::AuthCredentials(username, password)); diff --git a/content/shell/browser/shell_login_dialog.h b/content/shell/browser/shell_login_dialog.h index d9b0504..db70cb6 100644 --- a/content/shell/browser/shell_login_dialog.h +++ b/content/shell/browser/shell_login_dialog.h @@ -43,7 +43,8 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // the aforementioned platform specific code may not have access to private // members. Not to be called from client code. // Threading: UI thread. - void UserAcceptedAuth(const string16& username, const string16& password); + void UserAcceptedAuth(const base::string16& username, + const base::string16& password); void UserCancelledAuth(); protected: @@ -55,7 +56,7 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // platform specific LoginDialog implementation. // Creates the dialog. // Threading: UI thread. - void PlatformCreateDialog(const string16& message); + void PlatformCreateDialog(const base::string16& message); // Called from the destructor to let each platform do any necessary cleanup. // Threading: UI thread. void PlatformCleanUp(); @@ -65,13 +66,13 @@ class ShellLoginDialog : public ResourceDispatcherHostLoginDelegate { // Sets up dialog creation. // Threading: UI thread. - void PrepDialog(const string16& host, const string16& realm); + void PrepDialog(const base::string16& host, const base::string16& realm); // Sends the authentication to the requester. // Threading: IO thread. void SendAuthToRequester(bool success, - const string16& username, - const string16& password); + const base::string16& username, + const base::string16& password); // Who/where/what asked for the authentication. // Threading: IO thread. diff --git a/content/shell/browser/shell_login_dialog_gtk.cc b/content/shell/browser/shell_login_dialog_gtk.cc index b08b449..97fafec 100644 --- a/content/shell/browser/shell_login_dialog_gtk.cc +++ b/content/shell/browser/shell_login_dialog_gtk.cc @@ -19,7 +19,7 @@ namespace content { -void ShellLoginDialog::PlatformCreateDialog(const string16& message) { +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); int render_process_id; diff --git a/content/shell/browser/shell_login_dialog_mac.mm b/content/shell/browser/shell_login_dialog_mac.mm index 447aa58..3e014e8 100644 --- a/content/shell/browser/shell_login_dialog_mac.mm +++ b/content/shell/browser/shell_login_dialog_mac.mm @@ -87,7 +87,7 @@ const int kPasswordFieldTag = 2; namespace content { -void ShellLoginDialog::PlatformCreateDialog(const string16& message) { +void ShellLoginDialog::PlatformCreateDialog(const base::string16& message) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); helper_ = [[ShellLoginDialogHelper alloc] init]; diff --git a/content/shell/browser/shell_mac.mm b/content/shell/browser/shell_mac.mm index 335f4af..e31ba09 100644 --- a/content/shell/browser/shell_mac.mm +++ b/content/shell/browser/shell_mac.mm @@ -274,7 +274,7 @@ void Shell::PlatformResizeSubViews() { // Not needed; subviews are bound. } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { if (headless_) return; diff --git a/content/shell/browser/shell_network_delegate.cc b/content/shell/browser/shell_network_delegate.cc index 560426f..1e4dddc 100644 --- a/content/shell/browser/shell_network_delegate.cc +++ b/content/shell/browser/shell_network_delegate.cc @@ -69,7 +69,7 @@ void ShellNetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) { } void ShellNetworkDelegate::OnPACScriptError(int line_number, - const string16& error) { + const base::string16& error) { } ShellNetworkDelegate::AuthRequiredResponse ShellNetworkDelegate::OnAuthRequired( diff --git a/content/shell/browser/shell_network_delegate.h b/content/shell/browser/shell_network_delegate.h index a3ce0a2..286cc0a 100644 --- a/content/shell/browser/shell_network_delegate.h +++ b/content/shell/browser/shell_network_delegate.h @@ -42,7 +42,7 @@ class ShellNetworkDelegate : public net::NetworkDelegate { virtual void OnCompleted(net::URLRequest* request, bool started) OVERRIDE; virtual void OnURLRequestDestroyed(net::URLRequest* request) OVERRIDE; virtual void OnPACScriptError(int line_number, - const string16& error) OVERRIDE; + const base::string16& error) OVERRIDE; virtual AuthRequiredResponse OnAuthRequired( net::URLRequest* request, const net::AuthChallengeInfo& auth_info, diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc index 273eef6..e137fcb 100644 --- a/content/shell/browser/shell_views.cc +++ b/content/shell/browser/shell_views.cc @@ -110,7 +110,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, #endif } - void SetWindowTitle(const string16& title) { title_ = title; } + void SetWindowTitle(const base::string16& title) { title_ = title; } void EnableUIControl(UIControl control, bool is_enabled) { if (control == BACK_BUTTON) { back_button_->SetState(is_enabled ? views::CustomButton::STATE_NORMAL @@ -215,7 +215,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, } // Overridden from TextfieldController virtual void ContentsChanged(views::Textfield* sender, - const string16& new_contents) OVERRIDE { + const base::string16& new_contents) OVERRIDE { } virtual bool HandleKeyEvent(views::Textfield* sender, const ui::KeyEvent& key_event) OVERRIDE { @@ -248,7 +248,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, // Overridden from WidgetDelegateView virtual bool CanResize() const OVERRIDE { return true; } virtual bool CanMaximize() const OVERRIDE { return true; } - virtual string16 GetWindowTitle() const OVERRIDE { + virtual base::string16 GetWindowTitle() const OVERRIDE { return title_; } virtual void WindowClosing() OVERRIDE { @@ -272,7 +272,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, Shell* shell_; // Window title - string16 title_; + base::string16 title_; // Toolbar view contains forward/backward/reload button and URL entry View* toolbar_view_; @@ -387,7 +387,7 @@ void Shell::Close() { window_widget_->CloseNow(); } -void Shell::PlatformSetTitle(const string16& title) { +void Shell::PlatformSetTitle(const base::string16& title) { ShellWindowDelegateView* delegate_view = static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); delegate_view->SetWindowTitle(title); diff --git a/content/shell/browser/shell_win.cc b/content/shell/browser/shell_win.cc index 0cd65db..b9e57a9 100644 --- a/content/shell/browser/shell_win.cc +++ b/content/shell/browser/shell_win.cc @@ -278,7 +278,7 @@ LRESULT CALLBACK Shell::EditWndProc(HWND hwnd, UINT message, lParam); } -void Shell::PlatformSetTitle(const string16& text) { +void Shell::PlatformSetTitle(const base::string16& text) { ::SetWindowText(window_, text.c_str()); } diff --git a/content/shell/common/shell_content_client.cc b/content/shell/common/shell_content_client.cc index 495ad85..8cb0f88 100644 --- a/content/shell/common/shell_content_client.cc +++ b/content/shell/common/shell_content_client.cc @@ -29,7 +29,7 @@ std::string ShellContentClient::GetUserAgent() const { return webkit_glue::BuildUserAgentFromProduct(product); } -string16 ShellContentClient::GetLocalizedString(int message_id) const { +base::string16 ShellContentClient::GetLocalizedString(int message_id) const { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { switch (message_id) { case IDS_FORM_OTHER_DATE_LABEL: diff --git a/content/shell/common/shell_content_client.h b/content/shell/common/shell_content_client.h index 84a1483..478c065 100644 --- a/content/shell/common/shell_content_client.h +++ b/content/shell/common/shell_content_client.h @@ -18,7 +18,7 @@ class ShellContentClient : public ContentClient { virtual ~ShellContentClient(); virtual std::string GetUserAgent() const OVERRIDE; - virtual string16 GetLocalizedString(int message_id) const OVERRIDE; + virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE; virtual base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const OVERRIDE; diff --git a/content/shell/common/webkit_test_helpers.cc b/content/shell/common/webkit_test_helpers.cc index a0cebeb..3d3212e 100644 --- a/content/shell/common/webkit_test_helpers.cc +++ b/content/shell/common/webkit_test_helpers.cc @@ -71,7 +71,7 @@ void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) { prefs->allow_displaying_insecure_content = true; prefs->allow_running_insecure_content = true; prefs->webgl_errors_to_console_enabled = false; - string16 serif; + base::string16 serif; #if defined(OS_MACOSX) prefs->cursive_font_family_map[webkit_glue::kCommonScript] = ASCIIToUTF16("Apple Chancery"); diff --git a/content/shell/geolocation/shell_access_token_store.cc b/content/shell/geolocation/shell_access_token_store.cc index ceae3d6..4b8b007 100644 --- a/content/shell/geolocation/shell_access_token_store.cc +++ b/content/shell/geolocation/shell_access_token_store.cc @@ -49,7 +49,7 @@ void ShellAccessTokenStore::RespondOnOriginatingThread( } void ShellAccessTokenStore::SaveAccessToken( - const GURL& server_url, const string16& access_token) { + const GURL& server_url, const base::string16& access_token) { } } // namespace content diff --git a/content/shell/geolocation/shell_access_token_store.h b/content/shell/geolocation/shell_access_token_store.h index 82ee0f8..0345b8c 100644 --- a/content/shell/geolocation/shell_access_token_store.h +++ b/content/shell/geolocation/shell_access_token_store.h @@ -28,7 +28,7 @@ class ShellAccessTokenStore : public content::AccessTokenStore { const LoadAccessTokensCallbackType& callback) OVERRIDE; virtual void SaveAccessToken( - const GURL& server_url, const string16& access_token) OVERRIDE; + const GURL& server_url, const base::string16& access_token) OVERRIDE; content::ShellBrowserContext* shell_browser_context_; net::URLRequestContextGetter* system_request_context_; diff --git a/content/test/content_browser_test_test.cc b/content/test/content_browser_test_test.cc index 8738a00..b9bf217 100644 --- a/content/test/content_browser_test_test.cc +++ b/content/test/content_browser_test_test.cc @@ -31,10 +31,10 @@ class ContentBrowserTestSanityTest : public ContentBrowserTest { void Test() { GURL url = GetTestUrl(".", "simple_page.html"); - string16 expected_title(ASCIIToUTF16("OK")); + base::string16 expected_title(ASCIIToUTF16("OK")); TitleWatcher title_watcher(shell()->web_contents(), expected_title); NavigateToURL(shell(), url); - string16 title = title_watcher.WaitAndGetTitle(); + base::string16 title = title_watcher.WaitAndGetTitle(); EXPECT_EQ(expected_title, title); } }; diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc index 4a4ad04..33332bd 100644 --- a/content/test/test_web_contents.cc +++ b/content/test/test_web_contents.cc @@ -94,7 +94,7 @@ bool TestWebContents::CreateRenderViewForRenderManager( RenderViewHost* render_view_host, int opener_route_id) { // This will go to a TestRenderViewHost. static_cast<RenderViewHostImpl*>( - render_view_host)->CreateRenderView(string16(), + render_view_host)->CreateRenderView(base::string16(), opener_route_id, -1); return true; @@ -212,7 +212,7 @@ void TestWebContents::TestDidFailLoadWithError( const GURL& url, bool is_main_frame, int error_code, - const string16& error_description) { + const base::string16& error_description) { ViewHostMsg_DidFailLoadWithError msg( 0, frame_id, url, is_main_frame, error_code, error_description); OnMessageReceived(GetRenderViewHost(), msg); diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h index 7b308d8..5f338c6 100644 --- a/content/test/test_web_contents.h +++ b/content/test/test_web_contents.h @@ -97,7 +97,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester { const GURL& url, bool is_main_frame, int error_code, - const string16& error_description); + const base::string16& error_description); protected: // The deprecated WebContentsTester still needs to subclass this. diff --git a/content/test/test_web_contents_view.cc b/content/test/test_web_contents_view.cc index 9bed145..793a77c 100644 --- a/content/test/test_web_contents_view.cc +++ b/content/test/test_web_contents_view.cc @@ -103,7 +103,7 @@ RenderWidgetHostView* TestWebContentsView::CreateViewForPopupWidget( return NULL; } -void TestWebContentsView::SetPageTitle(const string16& title) { +void TestWebContentsView::SetPageTitle(const base::string16& title) { } void TestWebContentsView::RenderViewCreated(RenderViewHost* host) { diff --git a/content/test/test_web_contents_view.h b/content/test/test_web_contents_view.h index 707b632..045f092 100644 --- a/content/test/test_web_contents_view.h +++ b/content/test/test_web_contents_view.h @@ -60,7 +60,7 @@ class TestWebContentsView : public WebContentsViewPort, RenderWidgetHost* render_widget_host) OVERRIDE; virtual RenderWidgetHostView* CreateViewForPopupWidget( RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const string16& title) OVERRIDE; + virtual void SetPageTitle(const base::string16& title) OVERRIDE; virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(RenderViewHost* host) OVERRIDE; virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; diff --git a/content/test/weburl_loader_mock_factory.cc b/content/test/weburl_loader_mock_factory.cc index 2c91e6f..791ae1e 100644 --- a/content/test/weburl_loader_mock_factory.cc +++ b/content/test/weburl_loader_mock_factory.cc @@ -39,7 +39,7 @@ void WebURLLoaderMockFactory::RegisterURL(const WebURL& url, response_info.file_path = base::FilePath(static_cast<std::string>(file_path.utf8())); #elif defined(OS_WIN) - string16 file_path_16 = file_path; + base::string16 file_path_16 = file_path; response_info.file_path = base::FilePath(std::wstring( file_path_16.data(), file_path_16.length())); #endif diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc index 2a551f3..d77db25 100644 --- a/content/worker/websharedworker_stub.cc +++ b/content/worker/websharedworker_stub.cc @@ -19,7 +19,7 @@ namespace content { WebSharedWorkerStub::WebSharedWorkerStub( - const string16& name, + const base::string16& name, int route_id, const WorkerAppCacheInitInfo& appcache_init_info) : route_id_(route_id), @@ -81,8 +81,9 @@ const GURL& WebSharedWorkerStub::url() { } void WebSharedWorkerStub::OnStartWorkerContext( - const GURL& url, const string16& user_agent, const string16& source_code, - const string16& content_security_policy, + const GURL& url, const base::string16& user_agent, + const base::string16& source_code, + const base::string16& content_security_policy, blink::WebContentSecurityPolicyType policy_type) { // Ignore multiple attempts to start this worker (can happen if two pages // try to start it simultaneously). diff --git a/content/worker/websharedworker_stub.h b/content/worker/websharedworker_stub.h index ee5f509..66d11ea 100644 --- a/content/worker/websharedworker_stub.h +++ b/content/worker/websharedworker_stub.h @@ -25,7 +25,7 @@ class SharedWorkerDevToolsAgent; // appropriate WebSharedWorker APIs. class WebSharedWorkerStub : public IPC::Listener { public: - WebSharedWorkerStub(const string16& name, int route_id, + WebSharedWorkerStub(const base::string16& name, int route_id, const WorkerAppCacheInitInfo& appcache_init_info); // IPC::Listener implementation. @@ -54,8 +54,9 @@ class WebSharedWorkerStub : public IPC::Listener { void OnConnect(int sent_message_port_id, int routing_id); void OnStartWorkerContext( - const GURL& url, const string16& user_agent, const string16& source_code, - const string16& content_security_policy, + const GURL& url, const base::string16& user_agent, + const base::string16& source_code, + const base::string16& content_security_policy, blink::WebContentSecurityPolicyType policy_type); void OnTerminateWorkerContext(); @@ -70,7 +71,7 @@ class WebSharedWorkerStub : public IPC::Listener { WebSharedWorkerClientProxy client_; blink::WebSharedWorker* impl_; - string16 name_; + base::string16 name_; bool started_; GURL url_; scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; |