| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/shell/identity.h" | 5 #include "mojo/shell/identity.h" |
| 6 | 6 |
| 7 namespace mojo { | 7 namespace mojo { |
| 8 namespace shell { | 8 namespace shell { |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 bool Identity::operator<(const Identity& other) const { | 47 bool Identity::operator<(const Identity& other) const { |
| 48 // We specifically don't include filter in the equivalence check because we | 48 // We specifically don't include filter in the equivalence check because we |
| 49 // don't quite know how this should work yet. | 49 // don't quite know how this should work yet. |
| 50 // TODO(beng): figure out how it should work. | 50 // TODO(beng): figure out how it should work. |
| 51 if (url_ != other.url_) | 51 if (url_ != other.url_) |
| 52 return url_ < other.url_; | 52 return url_ < other.url_; |
| 53 return qualifier_ < other.qualifier_; | 53 return qualifier_ < other.qualifier_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool Identity::operator==(const Identity& other) const { |
| 57 return other.url_ == url_ && other.qualifier_ == qualifier_ && |
| 58 other.filter_ == filter_; |
| 59 } |
| 60 |
| 56 Identity CreateShellIdentity() { | 61 Identity CreateShellIdentity() { |
| 57 return Identity(GURL("mojo://shell/"), std::string(), | 62 return Identity(GURL("mojo://shell/"), std::string(), |
| 58 GetPermissiveCapabilityFilter()); | 63 GetPermissiveCapabilityFilter()); |
| 59 } | 64 } |
| 60 | 65 |
| 61 } // namespace shell | 66 } // namespace shell |
| 62 } // namespace mojo | 67 } // namespace mojo |
| OLD | NEW |