summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 19:30:52 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 19:30:52 +0000
commit24843159cf0cc74e6c847d102b4489488fd8d674 (patch)
tree37d27b6bd04686224342f31338cdca6ae67115fe
parent84d36b6362178938155837531efb703e241e98ab (diff)
downloadchromium_src-24843159cf0cc74e6c847d102b4489488fd8d674.zip
chromium_src-24843159cf0cc74e6c847d102b4489488fd8d674.tar.gz
chromium_src-24843159cf0cc74e6c847d102b4489488fd8d674.tar.bz2
Pass extension_id to AppNotifyChannelSetup
We need to pass this up to the server in our request. This CL just plumbs it through. BUG=none TEST=none Review URL: http://codereview.chromium.org/8351040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108330 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/app_notify_channel_setup.cc2
-rw-r--r--chrome/browser/extensions/app_notify_channel_setup.h2
-rw-r--r--chrome/browser/extensions/app_notify_channel_setup_unittest.cc3
-rw-r--r--chrome/browser/extensions/extension_tab_helper.cc1
4 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc
index c0ec84f..358a075 100644
--- a/chrome/browser/extensions/app_notify_channel_setup.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup.cc
@@ -19,6 +19,7 @@ using content::BrowserThread;
AppNotifyChannelSetup::AppNotifyChannelSetup(
Profile* profile,
+ const std::string& extension_id,
const std::string& client_id,
const GURL& requestor_url,
int return_route_id,
@@ -26,6 +27,7 @@ AppNotifyChannelSetup::AppNotifyChannelSetup(
AppNotifyChannelUI* ui,
base::WeakPtr<AppNotifyChannelSetup::Delegate> delegate)
: profile_(profile),
+ extension_id_(extension_id),
client_id_(client_id),
requestor_url_(requestor_url),
return_route_id_(return_route_id),
diff --git a/chrome/browser/extensions/app_notify_channel_setup.h b/chrome/browser/extensions/app_notify_channel_setup.h
index 7c56275..5a03f65 100644
--- a/chrome/browser/extensions/app_notify_channel_setup.h
+++ b/chrome/browser/extensions/app_notify_channel_setup.h
@@ -34,6 +34,7 @@ class AppNotifyChannelSetup
// Ownership of |ui| is transferred to this object.
AppNotifyChannelSetup(Profile* profile,
+ const std::string& extension_id,
const std::string& client_id,
const GURL& requestor_url,
int return_route_id,
@@ -61,6 +62,7 @@ class AppNotifyChannelSetup
void ReportResult(const std::string& channel_id, const std::string& error);
Profile* profile_;
+ std::string extension_id_;
std::string client_id_;
GURL requestor_url_;
int return_route_id_;
diff --git a/chrome/browser/extensions/app_notify_channel_setup_unittest.cc b/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
index 8908cec..20bc403 100644
--- a/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
@@ -23,6 +23,7 @@ namespace {
const int kRouteId = 4;
const int kCallbackId = 5;
+const char* kFakeExtensionId = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
class TestDelegate : public AppNotifyChannelSetup::Delegate,
public base::SupportsWeakPtr<TestDelegate> {
@@ -144,6 +145,7 @@ class AppNotifyChannelSetupTest : public testing::Test {
scoped_refptr<AppNotifyChannelSetup > setup =
new AppNotifyChannelSetup(&profile_,
+ kFakeExtensionId,
"1234",
page_url,
kRouteId,
@@ -169,6 +171,7 @@ TEST_F(AppNotifyChannelSetupTest, DidNotLogInToSync) {
ui_->SetSyncSetupResult(false);
scoped_refptr<AppNotifyChannelSetup > setup =
new AppNotifyChannelSetup(&profile_,
+ kFakeExtensionId,
"1234",
url,
kRouteId,
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index a5b726d..d597396 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -192,6 +192,7 @@ void ExtensionTabHelper::OnGetAppNotifyChannel(
scoped_refptr<AppNotifyChannelSetup> channel_setup(
new AppNotifyChannelSetup(profile,
+ extension->id(),
client_id,
requestor_url,
return_route_id,