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

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: Code review comments (not all). 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages); 355 return profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
356 } 356 }
357 357
358 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() { 358 SkBitmap* ChromeContentBrowserClient::GetDefaultFavicon() {
359 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); 359 ResourceBundle &rb = ResourceBundle::GetSharedInstance();
360 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); 360 return rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
361 } 361 }
362 362
363 bool ChromeContentBrowserClient::AllowAppCache( 363 bool ChromeContentBrowserClient::AllowAppCache(
364 const GURL& manifest_url, 364 const GURL& manifest_url,
365 const GURL& first_party,
365 const content::ResourceContext& context) { 366 const content::ResourceContext& context) {
366 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 367 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
367 ProfileIOData* io_data = 368 ProfileIOData* io_data =
368 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL)); 369 reinterpret_cast<ProfileIOData*>(context.GetUserData(NULL));
369 // FIXME(jochen): get the correct top-level origin.
370 ContentSetting setting = io_data->GetHostContentSettingsMap()-> 370 ContentSetting setting = io_data->GetHostContentSettingsMap()->
371 GetCookieContentSetting(manifest_url, manifest_url, true); 371 GetCookieContentSetting(manifest_url, first_party, true);
372 DCHECK(setting != CONTENT_SETTING_DEFAULT); 372 DCHECK(setting != CONTENT_SETTING_DEFAULT);
373 return setting != CONTENT_SETTING_BLOCK; 373 return setting != CONTENT_SETTING_BLOCK;
374 } 374 }
375 375
376 bool ChromeContentBrowserClient::AllowGetCookie( 376 bool ChromeContentBrowserClient::AllowGetCookie(
377 const GURL& url, 377 const GURL& url,
378 const GURL& first_party, 378 const GURL& first_party,
379 const net::CookieList& cookie_list, 379 const net::CookieList& cookie_list,
380 const content::ResourceContext& context, 380 const content::ResourceContext& context,
381 int render_process_id, 381 int render_process_id,
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 #if defined(USE_NSS) 783 #if defined(USE_NSS)
784 crypto::CryptoModuleBlockingPasswordDelegate* 784 crypto::CryptoModuleBlockingPasswordDelegate*
785 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 785 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
786 const GURL& url) { 786 const GURL& url) {
787 return browser::NewCryptoModuleBlockingDialogDelegate( 787 return browser::NewCryptoModuleBlockingDialogDelegate(
788 browser::kCryptoModulePasswordKeygen, url.host()); 788 browser::kCryptoModulePasswordKeygen, url.host());
789 } 789 }
790 #endif 790 #endif
791 791
792 } // namespace chrome 792 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698