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

Unified 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, 2 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/geolocation/geolocation_permission_request_id.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/geolocation_permission_request_id.cc
===================================================================
--- chrome/browser/geolocation/geolocation_permission_request_id.cc (revision 0)
+++ chrome/browser/geolocation/geolocation_permission_request_id.cc (working copy)
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/geolocation/geolocation_permission_request_id.h"
+
+#include "base/stringprintf.h"
+
+
+GeolocationPermissionRequestID::GeolocationPermissionRequestID(
+ int render_process_id,
+ int render_view_id,
+ int bridge_id)
+ : render_process_id_(render_process_id),
+ render_view_id_(render_view_id),
+ bridge_id_(bridge_id) {
+}
+
+GeolocationPermissionRequestID::~GeolocationPermissionRequestID() {
+}
+
+bool GeolocationPermissionRequestID::Equals(
+ const GeolocationPermissionRequestID& other) const {
+ return IsForSameTabAs(other) && (bridge_id_ == other.bridge_id_);
+}
+
+bool GeolocationPermissionRequestID::IsForSameTabAs(
+ const GeolocationPermissionRequestID& other) const {
+ return (render_process_id_ == other.render_process_id_) &&
+ (render_view_id_ == other.render_view_id_);
+}
+
+std::string GeolocationPermissionRequestID::ToString() const {
+ return base::StringPrintf("%d,%d,%d", render_process_id_, render_view_id_,
+ bridge_id_);
+}
Property changes on: chrome/browser/geolocation/geolocation_permission_request_id.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
« 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