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

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer.cc

Issue 10836064: Send cookies in inline install metadata requests, so that trusted tester items can be installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/extensions/webstore_inline_installer.h" 5 #include "chrome/browser/extensions/webstore_inline_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 webstore_data_url_fetcher_.reset(net::URLFetcher::Create( 176 webstore_data_url_fetcher_.reset(net::URLFetcher::Create(
177 webstore_data_url, net::URLFetcher::GET, this)); 177 webstore_data_url, net::URLFetcher::GET, this));
178 Profile* profile = Profile::FromBrowserContext( 178 Profile* profile = Profile::FromBrowserContext(
179 web_contents()->GetBrowserContext()); 179 web_contents()->GetBrowserContext());
180 webstore_data_url_fetcher_->SetRequestContext( 180 webstore_data_url_fetcher_->SetRequestContext(
181 profile->GetRequestContext()); 181 profile->GetRequestContext());
182 // Use the requesting page as the referrer both since that is more correct 182 // Use the requesting page as the referrer both since that is more correct
183 // (it is the page that caused this request to happen) and so that we can 183 // (it is the page that caused this request to happen) and so that we can
184 // track top sites that trigger inline install requests. 184 // track top sites that trigger inline install requests.
185 webstore_data_url_fetcher_->SetReferrer(requestor_url_.spec()); 185 webstore_data_url_fetcher_->SetReferrer(requestor_url_.spec());
186 webstore_data_url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 186 webstore_data_url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
187 net::LOAD_DO_NOT_SAVE_COOKIES |
188 net::LOAD_DISABLE_CACHE); 187 net::LOAD_DISABLE_CACHE);
189 webstore_data_url_fetcher_->Start(); 188 webstore_data_url_fetcher_->Start();
190 } 189 }
191 190
192 WebstoreInlineInstaller::~WebstoreInlineInstaller() {} 191 WebstoreInlineInstaller::~WebstoreInlineInstaller() {}
193 192
194 void WebstoreInlineInstaller::OnURLFetchComplete( 193 void WebstoreInlineInstaller::OnURLFetchComplete(
195 const net::URLFetcher* source) { 194 const net::URLFetcher* source) {
196 CHECK_EQ(webstore_data_url_fetcher_.get(), source); 195 CHECK_EQ(webstore_data_url_fetcher_.get(), source);
197 // We shouldn't be getting UrlFetcher callbacks if the WebContents has gone 196 // We shouldn't be getting UrlFetcher callbacks if the WebContents has gone
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 DLOG(WARNING) << "Could not parse " << verified_site_url << 454 DLOG(WARNING) << "Could not parse " << verified_site_url <<
456 " as URL pattern " << parse_result; 455 " as URL pattern " << parse_result;
457 return false; 456 return false;
458 } 457 }
459 verified_site_pattern.SetScheme("*"); 458 verified_site_pattern.SetScheme("*");
460 459
461 return verified_site_pattern.MatchesURL(requestor_url); 460 return verified_site_pattern.MatchesURL(requestor_url);
462 } 461 }
463 462
464 } // namespace extensions 463 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698