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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_request_id.cc

Issue 11269002: Introduce GeolocationPermissionRequestID, a wrapper struct to contain the (render process ID, rende… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/geolocation/geolocation_permission_request_id.h"
6
7 #include "base/stringprintf.h"
8
9
10 GeolocationPermissionRequestID::GeolocationPermissionRequestID(
11 int render_process_id,
12 int render_view_id,
13 int bridge_id)
14 : render_process_id_(render_process_id),
15 render_view_id_(render_view_id),
16 bridge_id_(bridge_id) {
17 }
18
19 GeolocationPermissionRequestID::~GeolocationPermissionRequestID() {
20 }
21
22 bool GeolocationPermissionRequestID::Equals(
23 const GeolocationPermissionRequestID& other) const {
24 return IsForSameTabAs(other) && (bridge_id_ == other.bridge_id_);
25 }
26
27 bool GeolocationPermissionRequestID::IsForSameTabAs(
28 const GeolocationPermissionRequestID& other) const {
29 return (render_process_id_ == other.render_process_id_) &&
30 (render_view_id_ == other.render_view_id_);
31 }
32
33 std::string GeolocationPermissionRequestID::ToString() const {
34 return base::StringPrintf("%d,%d,%d", render_process_id_, render_view_id_,
35 bridge_id_);
36 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_permission_request_id.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698