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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 7720022: Third-party appcache blocking. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_about_handler.h" 9 #include "chrome/browser/browser_about_handler.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); 378 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
379 } 379 }
380 380
381 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { 381 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() {
382 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); 382 ResourceBundle &rb = ResourceBundle::GetSharedInstance();
383 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); 383 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
384 } 384 }
385 385
386 bool ChromeContentBrowserClient::AllowAppCache( 386 bool ChromeContentBrowserClient::AllowAppCache(
387 const GURL& manifest_url, 387 const GURL& manifest_url,
388 const GURL& first_party,
388 const content::ResourceContext& context) { 389 const content::ResourceContext& context) {
389 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 390 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
390 ProfileIOData* io_data = 391 ProfileIOData* io_data =
391 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); 392 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
392 // FIXME(jochen): get the correct top-level origin.
393 ContentSetting setting = io_data->GetHostContentSettingsMap()-> 393 ContentSetting setting = io_data->GetHostContentSettingsMap()->
394 GetCookieContentSetting(manifest_url, manifest_url, true); 394 GetCookieContentSetting(manifest_url, first_party, true);
395 DCHECK(setting != CONTENT_SETTING_DEFAULT); 395 DCHECK(setting != CONTENT_SETTING_DEFAULT);
396 return setting != CONTENT_SETTING_BLOCK; 396 return setting != CONTENT_SETTING_BLOCK;
397 } 397 }
398 398
399 bool ChromeContentBrowserClient::AllowGetCookie( 399 bool ChromeContentBrowserClient::AllowGetCookie(
400 const GURL& url, 400 const GURL& url,
401 const GURL& first_party, 401 const GURL& first_party,
402 const net::CookieList& cookie_list, 402 const net::CookieList& cookie_list,
403 const content::ResourceContext& context, 403 const content::ResourceContext& context,
404 int render_process_id, 404 int render_process_id,
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 #if defined(USE_NSS) 806 #if defined(USE_NSS)
807 crypto::CryptoModuleBlockingPasswordDelegate* 807 crypto::CryptoModuleBlockingPasswordDelegate*
808 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 808 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
809 const GURL& url) { 809 const GURL& url) {
810 return browser::NewCryptoModuleBlockingDialogDelegate( 810 return browser::NewCryptoModuleBlockingDialogDelegate(
811 browser::kCryptoModulePasswordKeygen, url.host()); 811 browser::kCryptoModulePasswordKeygen, url.host());
812 } 812 }
813 #endif 813 #endif
814 814
815 } // namespace chrome 815 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/renderer_host/offline_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698