OLD | NEW |
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/ui/webui/sync_promo/sync_promo_ui.h" | 5 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/first_run/first_run.h" | 11 #include "chrome/browser/first_run/first_run.h" |
12 #include "chrome/browser/google/google_util.h" | 12 #include "chrome/browser/google/google_util.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/profiles/profile_info_cache.h" | 15 #include "chrome/browser/profiles/profile_info_cache.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/sync/profile_sync_service.h" | 17 #include "chrome/browser/sync/profile_sync_service.h" |
18 #include "chrome/browser/sync/profile_sync_service_factory.h" | 18 #include "chrome/browser/sync/profile_sync_service_factory.h" |
19 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 19 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
20 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 20 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
21 #include "chrome/browser/ui/webui/options2/core_options_handler.h" | 21 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
22 #include "chrome/browser/ui/webui/sync_promo/sync_promo_handler.h" | 22 #include "chrome/browser/ui/webui/sync_promo/sync_promo_handler.h" |
23 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" | 23 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" |
24 #include "chrome/browser/ui/webui/theme_source.h" | 24 #include "chrome/browser/ui/webui/theme_source.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
28 #include "chrome/common/net/url_util.h" | 28 #include "chrome/common/net/url_util.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
30 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
31 #include "googleurl/src/url_util.h" | 31 #include "googleurl/src/url_util.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 bool SyncPromoUI::GetAutoCloseForSyncPromoURL(const GURL& url) { | 257 bool SyncPromoUI::GetAutoCloseForSyncPromoURL(const GURL& url) { |
258 std::string value; | 258 std::string value; |
259 if (chrome_common_net::GetValueForKeyInQuery( | 259 if (chrome_common_net::GetValueForKeyInQuery( |
260 url, kSyncPromoQueryKeyAutoClose, &value)) { | 260 url, kSyncPromoQueryKeyAutoClose, &value)) { |
261 int source = 0; | 261 int source = 0; |
262 base::StringToInt(value, &source); | 262 base::StringToInt(value, &source); |
263 return (source == 1); | 263 return (source == 1); |
264 } | 264 } |
265 return false; | 265 return false; |
266 } | 266 } |
OLD | NEW |