| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/login/merge_session_throttle.h" | 5 #include "chrome/browser/chromeos/login/merge_session_throttle.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "chrome/browser/chromeos/login/login_utils.h" | 12 #include "chrome/browser/chromeos/login/login_utils.h" |
| 13 #include "chrome/browser/google/google_util.h" | 13 #include "chrome/browser/google/google_util.h" |
| 14 #include "chrome/browser/net/chrome_url_request_context.h" | 14 #include "chrome/browser/net/chrome_url_request_context.h" |
| 15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/render_view_host.h" | 17 #include "content/public/browser/render_view_host.h" |
| 18 #include "content/public/browser/resource_controller.h" | 18 #include "content/public/browser/resource_controller.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
| 21 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 bool MergeSessionThrottle::ShouldShowMergeSessionPage(const GURL& url) const { | 95 bool MergeSessionThrottle::ShouldShowMergeSessionPage(const GURL& url) const { |
| 96 // If we are loading google properties while merge session is in progress, | 96 // If we are loading google properties while merge session is in progress, |
| 97 // we will show delayed loading page instead. | 97 // we will show delayed loading page instead. |
| 98 return !net::NetworkChangeNotifier::IsOffline() && | 98 return !net::NetworkChangeNotifier::IsOffline() && |
| 99 chromeos::UserManager::Get()->GetMergeSessionState() == | 99 chromeos::UserManager::Get()->GetMergeSessionState() == |
| 100 chromeos::UserManager::MERGE_STATUS_IN_PROCESS && | 100 chromeos::UserManager::MERGE_STATUS_IN_PROCESS && |
| 101 google_util::IsGoogleHostname(url.host(), | 101 google_util::IsGoogleHostname(url.host(), |
| 102 google_util::ALLOW_SUBDOMAIN); | 102 google_util::ALLOW_SUBDOMAIN); |
| 103 } | 103 } |
| OLD | NEW |