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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc

Issue 1754393002: Fix current profile is unnecessary added to "Open link as" context menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix implicit conversion of signed and unsigned integers Created 4 years, 10 months 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 | « chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc
index b8889bfe5e51cbd887acf32770226ea399799f7f..a0da432c872a8431a26d392b05b4e6759ac5c165 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_test_util.cc
@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include <string>
+#include <vector>
+#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/models/menu_model.h"
@@ -79,13 +81,13 @@ bool TestRenderViewContextMenu::GetMenuModelAndItemIndex(
return false;
}
-size_t TestRenderViewContextMenu::GetItemIndexByProfilePath(
+int TestRenderViewContextMenu::GetCommandIDByProfilePath(
const base::FilePath& path) {
size_t count = profile_link_paths_.size();
for (size_t i = 0; i < count; ++i)
if (profile_link_paths_[i] == path)
- return i;
- return std::string::npos;
+ return IDC_OPEN_LINK_IN_PROFILE_FIRST + static_cast<int>(i);
+ return -1;
}
void TestRenderViewContextMenu::Show() {
« no previous file with comments | « chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698