PTAL https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/router/media_route.cc File chrome/browser/media/router/media_route.cc (right): https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/router/media_route.cc#newcode36 chrome/browser/media/router/media_route.cc:36: std::pair<std::string, std::string> GetPresentationIdAndUrl( On 2015/06/24 23:02:06, Kevin M ...
5 years, 6 months ago
(2015-06-24 23:25:13 UTC)
#5
PTAL
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
File chrome/browser/media/router/media_route.cc (right):
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
chrome/browser/media/router/media_route.cc:36: std::pair<std::string,
std::string> GetPresentationIdAndUrl(
On 2015/06/24 23:02:06, Kevin M wrote:
> This needs a plain description of how the URLs are formatted.
Done.
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
chrome/browser/media/router/media_route.cc:44: size_t first_delim =
id.find("/");
On 2015/06/24 23:02:06, Kevin M wrote:
> Use a string splitting function (base/strings/string_split.h) so you don't
have
> to call find repeatedly, or compute substrings.
string_split will has issue because the URL can have delim '/'.
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
File chrome/browser/media/router/media_route.h (right):
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
chrome/browser/media/router/media_route.h:83: // a pair of empty strings is
returned.
On 2015/06/24 23:02:07, Kevin M wrote:
> If a caller is going to use half the pair but discard the other half, then
this
> should be split into 2 functions vs. returning a pair to save on unnecessary
> processing.
>
> I recommend just making an additional function that takes a computed
> presentation URL and returns a StringPiece representing the source substr.
yes, there are lot more fields in the route-id. I do not want to do it in the
CL. Prefer a separate CL for refactoring source/sink/route URN.
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
chrome/browser/media/router/media_route.h:83: // a pair of empty strings is
returned.
On 2015/06/24 23:02:07, Kevin M wrote:
> Presentation API support functions should be in preso API files.
Ack. Constructing presentation session message is done here. Moving it to
presention_service_delegate_impl makes sense, but incurs extra cost of blinding
message_callback to itself, pass media_router.mojo's route message format, etc.
To avoid using media_router.mojo's route message format in presentation files,
we need to create another class shared by both, an unnecessary cost for carrying
message along.
https://codereview.chromium.org/1202963004/diff/20001/chrome/browser/media/ro...
chrome/browser/media/router/media_route.h:83: // a pair of empty strings is
returned.
On 2015/06/24 23:02:07, Kevin M wrote:
> Document the parameters and return type
They are obvious in method signature. Not sure about the value of adding more
doc.
https://codereview.chromium.org/1202963004/diff/40001/content/browser/present...
File content/browser/presentation/presentation_service_impl.cc (right):
https://codereview.chromium.org/1202963004/diff/40001/content/browser/present...
content/browser/presentation/presentation_service_impl.cc:466:
on_session_messages_callback_->Run(
On 2015/06/24 23:02:07, Kevin M wrote:
> Add a comment indicating that branch is an error handler (it took some digging
> for me to understand what empty array meant)
Done.
Issue 1202963004: Gets presentation ID from route ID upon route creation, and overrides previous presentation ID with…
(Closed)
Created 5 years, 6 months ago by haibinlu
Modified 5 years, 6 months ago
Reviewers: imcheng, Kevin M, imcheng (use chromium acct)
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 18