| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cookies_tree_model.h" | 5 #include "chrome/browser/cookies_tree_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/resource_bundle.h" | |
| 13 #include "base/callback.h" | 12 #include "base/callback.h" |
| 14 #include "base/linked_ptr.h" | 13 #include "base/linked_ptr.h" |
| 15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 16 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 17 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
| 18 #include "chrome/browser/in_process_webkit/webkit_context.h" | 17 #include "chrome/browser/in_process_webkit/webkit_context.h" |
| 19 #include "grit/app_resources.h" | 18 #include "grit/app_resources.h" |
| 20 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 21 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 22 #include "net/base/cookie_monster.h" | 21 #include "net/base/cookie_monster.h" |
| 23 #include "net/base/registry_controlled_domain.h" | 22 #include "net/base/registry_controlled_domain.h" |
| 24 #include "net/url_request/url_request_context.h" | 23 #include "net/url_request/url_request_context.h" |
| 25 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
| 25 #include "ui/base/resource/resource_bundle.h" |
| 26 | 26 |
| 27 static const char kFileOriginNodeName[] = "file://"; | 27 static const char kFileOriginNodeName[] = "file://"; |
| 28 | 28 |
| 29 /////////////////////////////////////////////////////////////////////////////// | 29 /////////////////////////////////////////////////////////////////////////////// |
| 30 // CookieTreeNode, public: | 30 // CookieTreeNode, public: |
| 31 | 31 |
| 32 void CookieTreeNode::DeleteStoredObjects() { | 32 void CookieTreeNode::DeleteStoredObjects() { |
| 33 std::for_each(children().begin(), | 33 std::for_each(children().begin(), |
| 34 children().end(), | 34 children().end(), |
| 35 std::mem_fun(&CookieTreeNode::DeleteStoredObjects)); | 35 std::mem_fun(&CookieTreeNode::DeleteStoredObjects)); |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 | 852 |
| 853 void CookiesTreeModel::NotifyObserverEndBatch() { | 853 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 854 // Only notify the observers if this is the outermost call to EndBatch() if | 854 // Only notify the observers if this is the outermost call to EndBatch() if |
| 855 // called in a nested manner. | 855 // called in a nested manner. |
| 856 if (--batch_update_ == 0) { | 856 if (--batch_update_ == 0) { |
| 857 FOR_EACH_OBSERVER(Observer, | 857 FOR_EACH_OBSERVER(Observer, |
| 858 cookies_observer_list_, | 858 cookies_observer_list_, |
| 859 TreeModelEndBatch(this)); | 859 TreeModelEndBatch(this)); |
| 860 } | 860 } |
| 861 } | 861 } |
| OLD | NEW |