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

Side by Side Diff: chrome/browser/content_settings/permission_context_base_unittest.cc

Issue 955383003: ContentBrowserClient::RequestPermission replies with PermissionStatus instead of bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android geolocation breakage Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/content_settings/permission_context_base.h" 5 #include "chrome/browser/content_settings/permission_context_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/content_settings/permission_queue_controller.h" 9 #include "chrome/browser/content_settings/permission_queue_controller.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 bool permission_set() { 43 bool permission_set() {
44 return permission_set_; 44 return permission_set_;
45 } 45 }
46 46
47 bool tab_context_updated() { 47 bool tab_context_updated() {
48 return tab_context_updated_; 48 return tab_context_updated_;
49 } 49 }
50 50
51 void TrackPermissionDecision(bool granted) { 51 void TrackPermissionDecision(ContentSetting content_setting) {
52 permission_set_ = true; 52 permission_set_ = true;
53 permission_granted_ = granted; 53 permission_granted_ = content_setting == CONTENT_SETTING_ALLOW;
54 } 54 }
55 55
56 protected: 56 protected:
57 void UpdateTabContext(const PermissionRequestID& id, 57 void UpdateTabContext(const PermissionRequestID& id,
58 const GURL& requesting_origin, 58 const GURL& requesting_origin,
59 bool allowed) override { 59 bool allowed) override {
60 tab_context_updated_ = true; 60 tab_context_updated_ = true;
61 } 61 }
62 62
63 private: 63 private:
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 #endif 286 #endif
287 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 287 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
288 CONTENT_SETTING_ASK); 288 CONTENT_SETTING_ASK);
289 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, 289 TestGrantAndRevoke_TestContent(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
290 CONTENT_SETTING_ASK); 290 CONTENT_SETTING_ASK);
291 #if defined(OS_ANDROID) 291 #if defined(OS_ANDROID)
292 TestGrantAndRevoke_TestContent( 292 TestGrantAndRevoke_TestContent(
293 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, CONTENT_SETTING_ASK); 293 CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, CONTENT_SETTING_ASK);
294 #endif 294 #endif
295 } 295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698