Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: services/navigation/public/cpp/view.cc

Issue 2493693003: Mojo C++ bindings: switch services/navigation mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/navigation/public/cpp/view.h ('k') | services/navigation/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/public/cpp/view.cc
diff --git a/services/navigation/public/cpp/view.cc b/services/navigation/public/cpp/view.cc
index 4fa6009282086d30bd1365fa3814871fbbdf6bed..23158cea2340de5592e8f5b332f23476b4ea5a4f 100644
--- a/services/navigation/public/cpp/view.cc
+++ b/services/navigation/public/cpp/view.cc
@@ -55,8 +55,8 @@ void View::GetBackMenuItems(std::vector<NavigationListItem>* items) {
DCHECK(items);
for (int i = navigation_list_cursor_ - 1, offset = -1; i >= 0;
--i, --offset) {
- std::string title = navigation_list_[i]->title;
- items->push_back(NavigationListItem(base::UTF8ToUTF16(title), offset));
+ items->push_back(NavigationListItem(
+ base::UTF8ToUTF16(navigation_list_[i]->title), offset));
}
}
@@ -64,8 +64,8 @@ void View::GetForwardMenuItems(std::vector<NavigationListItem>* items) {
DCHECK(items);
for (int i = navigation_list_cursor_ + 1, offset = 1;
i < static_cast<int>(navigation_list_.size()); ++i, ++offset) {
- std::string title = navigation_list_[i]->title;
- items->push_back(NavigationListItem(base::UTF8ToUTF16(title), offset));
+ items->push_back(NavigationListItem(
+ base::UTF8ToUTF16(navigation_list_[i]->title), offset));
}
}
@@ -106,11 +106,11 @@ void View::LoadingStateChanged(bool is_loading) {
}
void View::NavigationStateChanged(const GURL& url,
- const mojo::String& title,
+ const std::string& title,
bool can_go_back,
bool can_go_forward) {
url_ = url;
- title_ = base::UTF8ToUTF16(title.get());
+ title_ = base::UTF8ToUTF16(title);
can_go_back_ = can_go_back;
can_go_forward_ = can_go_forward;
for (auto& observer : observers_)
« no previous file with comments | « services/navigation/public/cpp/view.h ('k') | services/navigation/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698