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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 using base::ASCIIToUTF16; | 72 using base::ASCIIToUTF16; |
73 using extensions::Extension; | 73 using extensions::Extension; |
74 using extensions::Manifest; | 74 using extensions::Manifest; |
75 using extensions::UnloadedExtensionInfo; | 75 using extensions::UnloadedExtensionInfo; |
76 | 76 |
77 namespace { | 77 namespace { |
78 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; | 78 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; |
79 const char* gmail_url = "https://mail.google.com/mail/u"; | 79 const char* gmail_url = "https://mail.google.com/mail/u"; |
80 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; | 80 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; |
81 | 81 |
| 82 #if defined(OS_CHROMEOS) |
82 // As defined in /chromeos/dbus/cryptohome_client.cc. | 83 // As defined in /chromeos/dbus/cryptohome_client.cc. |
83 const char kUserIdHashSuffix[] = "-hash"; | 84 const char kUserIdHashSuffix[] = "-hash"; |
84 | 85 |
85 // An extension prefix. | 86 // An extension prefix. |
86 const char kCrxAppPrefix[] = "_crx_"; | 87 const char kCrxAppPrefix[] = "_crx_"; |
| 88 #endif |
87 | 89 |
88 // ShelfModelObserver implementation that tracks what messages are invoked. | 90 // ShelfModelObserver implementation that tracks what messages are invoked. |
89 class TestShelfModelObserver : public ash::ShelfModelObserver { | 91 class TestShelfModelObserver : public ash::ShelfModelObserver { |
90 public: | 92 public: |
91 TestShelfModelObserver() | 93 TestShelfModelObserver() |
92 : added_(0), | 94 : added_(0), |
93 removed_(0), | 95 removed_(0), |
94 changed_(0) { | 96 changed_(0) { |
95 } | 97 } |
96 | 98 |
(...skipping 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 | 2699 |
2698 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2700 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2699 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2701 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2700 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2702 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2701 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2703 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2702 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2704 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2703 | 2705 |
2704 launcher_controller_->UnpinAppWithID("1"); | 2706 launcher_controller_->UnpinAppWithID("1"); |
2705 ASSERT_EQ(initial_size, model_->items().size()); | 2707 ASSERT_EQ(initial_size, model_->items().size()); |
2706 } | 2708 } |
OLD | NEW |