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

Side by Side Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 11 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/geolocation/chrome_geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
6 6
7 #include <functional> 7 #include <functional>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 419 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
420 420
421 ContentSetting content_setting = 421 ContentSetting content_setting =
422 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; 422 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
423 profile_->GetHostContentSettingsMap()->SetContentSetting( 423 profile_->GetHostContentSettingsMap()->SetContentSetting(
424 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), 424 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()),
425 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()), 425 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()),
426 CONTENT_SETTINGS_TYPE_GEOLOCATION, 426 CONTENT_SETTINGS_TYPE_GEOLOCATION,
427 std::string(), 427 std::string(),
428 content_setting); 428 content_setting);
429 profile_->GetPrefs()->ScheduleSavePersistentPrefs();
430 429
431 for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin(); 430 for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin();
432 i != pending_infobar_requests_.end(); ) { 431 i != pending_infobar_requests_.end(); ) {
433 if (i->IsForPair(requesting_frame, embedder)) { 432 if (i->IsForPair(requesting_frame, embedder)) {
434 // Cancel this request first, then notify listeners. TODO(pkasting): Why 433 // Cancel this request first, then notify listeners. TODO(pkasting): Why
435 // is this order important? 434 // is this order important?
436 // NOTE: If the pending request had an infobar, TabContents will close it 435 // NOTE: If the pending request had an infobar, TabContents will close it
437 // either synchronously or asynchronously, which will then pump the queue 436 // either synchronously or asynchronously, which will then pump the queue
438 // via OnInfoBarClosed(). 437 // via OnInfoBarClosed().
439 PendingInfoBarRequest copied_request = *i; 438 PendingInfoBarRequest copied_request = *i;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 BrowserThread::UI, FROM_HERE, 671 BrowserThread::UI, FROM_HERE,
673 base::Bind( 672 base::Bind(
674 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, 673 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest,
675 this, render_process_id, render_view_id, bridge_id)); 674 this, render_process_id, render_view_id, bridge_id));
676 return; 675 return;
677 } 676 }
678 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 677 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
679 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, 678 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id,
680 render_view_id, bridge_id); 679 render_view_id, bridge_id);
681 } 680 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698