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

Side by Side Diff: chrome/browser/chromeos/extensions/echo_private_api.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 (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/chromeos/extensions/echo_private_api.h" 5 #include "chrome/browser/chromeos/extensions/echo_private_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/prefs/pref_registry_simple.h"
14 #include "base/prefs/pref_service.h"
15 #include "base/prefs/scoped_user_pref_update.h"
16 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
17 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
18 #include "base/time/time.h" 15 #include "base/time/time.h"
19 #include "base/values.h" 16 #include "base/values.h"
20 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chromeos/settings/cros_settings.h" 18 #include "chrome/browser/chromeos/settings/cros_settings.h"
22 #include "chrome/browser/chromeos/ui/echo_dialog_view.h" 19 #include "chrome/browser/chromeos/ui/echo_dialog_view.h"
23 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/browser_navigator_params.h" 21 #include "chrome/browser/ui/browser_navigator_params.h"
25 #include "chrome/common/extensions/api/echo_private.h" 22 #include "chrome/common/extensions/api/echo_private.h"
26 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
27 #include "chromeos/system/statistics_provider.h" 24 #include "chromeos/system/statistics_provider.h"
25 #include "components/prefs/pref_registry_simple.h"
26 #include "components/prefs/pref_service.h"
27 #include "components/prefs/scoped_user_pref_update.h"
28 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
29 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
30 #include "extensions/common/extension.h" 30 #include "extensions/common/extension.h"
31 31
32 namespace echo_api = extensions::api::echo_private; 32 namespace echo_api = extensions::api::echo_private;
33 33
34 using content::BrowserThread; 34 using content::BrowserThread;
35 35
36 namespace { 36 namespace {
37 37
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) { 272 void EchoPrivateGetUserConsentFunction::Finalize(bool consent) {
273 // Consent should not be true if offers redeeming is disabled. 273 // Consent should not be true if offers redeeming is disabled.
274 CHECK(redeem_offers_allowed_ || !consent); 274 CHECK(redeem_offers_allowed_ || !consent);
275 results_ = echo_api::GetUserConsent::Results::Create(consent); 275 results_ = echo_api::GetUserConsent::Results::Create(consent);
276 SendResponse(true); 276 SendResponse(true);
277 277
278 // Release the reference added in |OnRedeemOffersAllowedChecked|, before 278 // Release the reference added in |OnRedeemOffersAllowedChecked|, before
279 // showing the dialog. 279 // showing the dialog.
280 Release(); 280 Release();
281 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698