OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 using base::ASCIIToUTF16; | 71 using base::ASCIIToUTF16; |
72 using extensions::Extension; | 72 using extensions::Extension; |
73 using extensions::Manifest; | 73 using extensions::Manifest; |
74 using extensions::UnloadedExtensionInfo; | 74 using extensions::UnloadedExtensionInfo; |
75 | 75 |
76 namespace { | 76 namespace { |
77 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; | 77 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; |
78 const char* gmail_url = "https://mail.google.com/mail/u"; | 78 const char* gmail_url = "https://mail.google.com/mail/u"; |
79 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; | 79 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; |
80 | 80 |
| 81 #if defined(OS_CHROMEOS) |
81 // As defined in /chromeos/dbus/cryptohome_client.cc. | 82 // As defined in /chromeos/dbus/cryptohome_client.cc. |
82 const char kUserIdHashSuffix[] = "-hash"; | 83 const char kUserIdHashSuffix[] = "-hash"; |
83 | 84 |
84 // An extension prefix. | 85 // An extension prefix. |
85 const char kCrxAppPrefix[] = "_crx_"; | 86 const char kCrxAppPrefix[] = "_crx_"; |
| 87 #endif |
86 | 88 |
87 // ShelfModelObserver implementation that tracks what messages are invoked. | 89 // ShelfModelObserver implementation that tracks what messages are invoked. |
88 class TestShelfModelObserver : public ash::ShelfModelObserver { | 90 class TestShelfModelObserver : public ash::ShelfModelObserver { |
89 public: | 91 public: |
90 TestShelfModelObserver() | 92 TestShelfModelObserver() |
91 : added_(0), | 93 : added_(0), |
92 removed_(0), | 94 removed_(0), |
93 changed_(0) { | 95 changed_(0) { |
94 } | 96 } |
95 | 97 |
(...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 | 2695 |
2694 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2696 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2695 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2697 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2696 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2698 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2697 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2699 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2698 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2700 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2699 | 2701 |
2700 launcher_controller_->UnpinAppWithID("1"); | 2702 launcher_controller_->UnpinAppWithID("1"); |
2701 ASSERT_EQ(initial_size, model_->items().size()); | 2703 ASSERT_EQ(initial_size, model_->items().size()); |
2702 } | 2704 } |
OLD | NEW |